Adafruit Feather Huzzah ESP8266 pull-up resistor using Arduino IDE -
i working on adafruit feather huzzah esp8266 , add internal pull-up push button. when pull-up manually resistor, wiring works when add internal pull-up using following line in arduino ide code, not work properly.
pinmode(bouton,input_pullup)
here full code:
const int led = 13; const int bouton = 16; void setup() { pinmode(led, output); pinmode(bouton, input); } void loop() { int etat = digitalread(bouton); if(etat==low) { digitalwrite(led, high); } else { digitalwrite(led, low); } }
when writing program, had erroneously assumed gpio16 had pullup resistor. not.
at startup, pins configured input.
gpio0-gpio15 can input, output, or input_pullup. gpio16 can input, output, or input_pulldown_16. xpd deepsleep() (perhaps via small capacitor.)
note gpio6-gpio11 typically used interface flash memory ics on esp8266 modules, these pins should not used.
reference: http://www.esp8266.com/wiki/doku.php?id=esp8266_gpio_pin_allocations
Comments
Post a Comment