Freelance Project Requests info@CodeDocu.de Software Development in C# WPF Asp.Net Core Vba Excel Word SQL-Server EF Linq, UWP Net
#

Arduino Code: Declare an Enum Type, a Variable and Compare it

 

Arduino C Code-Sample

1. Declare an enum typdef

2. compare== the enum

 

 

 

 

Arduino C Code-Sample

1. Declare an enum typdef

2. compare== the enum

 

//declare enum Type

typedef enum {

  enum_var1, 

  enum_var2, 

  } enum_Test  ;

 

void setup() {

  Serial.begin(115200);

  Serial.println("Test Enum Enumaration in Ardino");

}

 

void loop() {

  //----< loop()>----

  //*create variable var1 of type enum enum_Test

  enum_Test var1=enum_var1;

 

  //*compare variable with enum-value

  if(var1==enum_var1)

  {

    Serial.println("Enum of type Operand== matched");

  }

 

  //----</ loop()>----

}

 

 

To solve the Arduino Compiler error message

exit status 1

no match for 'operator==' (operand types are 'String' and 'enum_SetCommands')

 

Mobile
»
Switch with ESP32 MosFET and high voltages with optocoupler
»
Solved: conversion from void to non-scalar type String requested bei String.replace und toLowerCase
»
Arduino Code: Declare an Enum Type, a Variable and Compare it
»
Connect ESP32 to Bluetooth, work and write and read commands
»
Solved: LCD shows strange signs on ESP32
»
Arduino : switch case

.

Contact for Jobs, Project Requests: raimund.popp@microsoft-programmierer.de