mongoose-os-apps / demo-c

A demo Mongoose OS firmware for C/C++
Other
10 stars 3 forks source link

ESP8266: Default (blue) led not working #1

Open guydelta opened 6 years ago

guydelta commented 6 years ago

Just initialised a new demo-c app, but noticed the blue LED is not flashing. Noticed it is due to https://github.com/mongoose-os-apps/demo-c/blob/master/src/main.c line#48 reading mgos_gpio_set_mode(mgos_sys_config_get_pins_led(), MGOS_GPIO_MODE_INPUT);

Changing this line to mgos_gpio_set_mode(mgos_sys_config_get_pins_led(), MGOS_GPIO_MODE_OUTPUT); fixes the demo.

brandond commented 6 years ago

Same is necessary on ESP32. I am guessing that the LED GPIO pin defaults to output mode on other boards?

roboter commented 6 years ago

try changing config file, set LED =2