Open guydelta opened 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);
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.
mgos_gpio_set_mode(mgos_sys_config_get_pins_led(), MGOS_GPIO_MODE_OUTPUT);
Same is necessary on ESP32. I am guessing that the LED GPIO pin defaults to output mode on other boards?
try changing config file, set LED =2
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.