ESP8266 how to identify board in code


hi,

done lot atmega , attiny's , use identify board i'm compiling for:

code: [select]

#if defined(__avr_attiny84__)
    //                    +--\/--+
    //               vcc 1|      |14 gnd
    //   [led] (d10) pb0 2|      |13 aref (d0)
    //          (d9) pb1 3|      |12 pa1  (d1) [tx]->
    //         reset pb3 4|      |11 pa2  (d2)
    //     int0 (d8) pb2 5|      |10 pa3  (d3)
    //      pwm (d7) pa7 6|      |9  pa4  (d4) [scl]<->
    // <->[sda] (d6) pa6 7|      |8  pa5  (d5) pwm
    //                    +------+
    //-- pa4 = scl (clock) pa6 = sda (data)!
    //-- pa1 = dil-12 = arduino ide d1
    //-- pb0 = dil-2 = arduino ide d10

#elif defined(__avr_attiny85__)
    //                    +--\/--+
    //         reset pb5 1|      |8 vcc
    //          (d3) pb3 2|      |7 pb2 (d2) [scl]<->
    //    [led] (d4) pb4 3|      |6 pb1 (d1) [tx]--->
    //               gnd 4|      |5 pb0 (d0) [sda]<->
    //                    +------+
    //-- pb2 = scl (clock) pb0 = sda (data)!
    //-- pb1 = dil-6 = arduino ide d1
    //-- pb4 = dil-3 = arduino ide d4

#else
    //-- atmega328 ----------------------
    //-- a5 = scl (clock) a4 = sda (data)!
    //-- pb1 = arduino ide d9
    //-- pb5 = arduino ide d13

#endif


now i'm trying same thing esp-boards:

code: [select]

// led needed failure signalling
#if defined(__esp8266_esp01__)
    const short int blue_led = 1;  //gpio1 on esp-01

#elif defined(__esp8266_nodemcu__)
    const short int blue_led = 16;  //gpio16 on nodemcu (esp-12)

#elif defined(__esp8266_wemos_d1mini__)
    const short int blue_led = builtin_led; 

#endif


but not work ..

can me please?



Arduino Forum > Using Arduino > Microcontrollers > ESP8266 how to identify board in code


arduino

Comments

Popular posts from this blog

DHT11 Time out error using v0.4.1library

Sketch upload fails with Java error (___REMOVE___/bin/avrdude)!

Arduino Uno + KTY81/210 temperature sensor