nodemcu / nodemcu-firmware

Lua based interactive firmware for ESP8266, ESP8285 and ESP32

Home Page:https://nodemcu.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can not disable nodemcu board build in blue led

liunanhao opened this issue · comments

Expected behavior

use lua code or c code to turn off nodemcu board build in blue led

Actual behavior

can turn on or turn off the blue led for a while,but then it will blinking again.

Test code

use Lua code to control the gpio2,which is connectting to the blue led.

  gpio.mode(4, gpio.OUTPUT)
  gpio.write(4, gpio.HIGH)
  wifi.setmode(wifi.STATION)
  local station_cfg = {}
  station_cfg.ssid = "WIFI_SSID"
  station_cfg.pwd = "WIFI_PASSWORD"
  wifi.sta.config(station_cfg)

also,i try c code to turn off the blue led

void user_init(void)
{
/////////////////////////////////////////
	// i also try this code below in wifi connect function.but still not work
    PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO2_U, FUNC_GPIO2); 
    GPIO_OUTPUT_SET(GPIO_ID_PIN(2), 1);
	wifi_status_led_uninstall();
////////////////////////////////////////
#ifdef LUA_USE_MODULES_RTCTIME
    rtctime_late_startup ();
#endif

    UartBautRate br = BIT_RATE_DEFAULT;

    input_sig = task_get_id(handle_input);
    uart_init (br, br, input_sig, &input_sig_flag);

#ifndef NODE_DEBUG
    system_set_os_print(0);
#endif
    system_init_done_cb(nodemcu_init);
}

NodeMCU startup banner

NodeMCU 2.2.0.0 build 210630070140 powered by Lua 5.1.4 on SDK 2.2.1(6ab97e9)

Hardware

image

This is board issue and not a Lua firmware one