I am a new user of Arduino boards, so far going thru the basic examples proposed on the site.
I am facing the following issue :
I have successfully run the switchCase2 example on an Arduino Uno board and I am now trying to get it to run on a ESP8266 based board.
This is the part for which I got a problem :
void setup() {
// initialize serial communication:*
Serial.begin(9600);*
// initialize the LED pins:*
for (int thisPin = 2; thisPin < 7; thisPin++) {*
pinMode(thisPin, OUTPUT);*
}* }
Could somebody explain me how to change the 'For loop' used in the void setup, knowing that on ESP8266 the pins are named D1, D2,D3, etc... . In other words, how do I construct a variable to place as argument 1 in pinMode function ?
So far with the different solutions I have tried, I got this error :
cannot convert 'String' to 'uint8_t {aka unsigned char}' for argument '1' to 'void pinMode(uint8_t, uint8_t)'
Delta_G:
What you have to understand is that D1, D2 etc are symbols standing for numbers. For each there is a number you could use. This is perfectly valid.