Category Archives: ESP8266 Mongoose_OS

ESP8266 Mongoose-OS Module – WiFi


We can set AP or STA or AP+STA mode in ESP8266 with Mongoose OS platform

  • SSID – SSID may be any combination of string, number, float
  • Password – Password is case sensitive.



Scan all available networks







Configure Access Point (Hotpots)

By default when flashing the firmware after ESP8266 WiFi configured as a AP mode in the WiFI AP SSID name of Mongoose_?????  here ????  is the chip id and password is Mongoose .


  • How to Set ESP8266 as AP mode?
  • How to Set ESP8266 as Hotpots?


Steps to follow

  • Go to Device files  tab in web browser using mos tool . (IP address )
  • Change the ap credential or set credential in conf0.json  file. (Refer Below Image)

Code Example

  • Enable AP Mode : "enable": true, .
  • Disable AP Mode : "enable": false, .
  • You can hide ESP8266 AP mode list using  "hidden": false,  (Not shown WiFi available list).




ESP8266 connect to WiFi Router





ESP8266 Mongoose-OS Interface – Button




Next :

Previous :


ESP8266 Mongoose-OS Tutorials – TCP Web Server



Next :

Previous :


ESP8266 Mongoose-OS Interface – LED

To turn on the led you need to load the gpio_api.js file.


Note : This below example was tested mongoose os with java script app demo-js in ESP8266 NodeMCU Dev Board(ESP-12E)

  • This below example turn on the LED GPIO-4 (NodeMCU Dev Board digital pin 2)
  • Set the GPIO pin mode as OUPUT uisng gpio set mode function ex: GPIO.set_mode(led, GPIO.MODE_OUTPUT)
  • Turn off the LED call the gpio write function with low-0 ex : GPIO.write(led, 0) .
  • Turn on the LED call the gpio write function with low-1 ex : GPIO.write(led, 1) .



LED turn ON/OFF using button

  • Use Boot button(GPIO-0)
  • The example code used blink in-build LED, It’s connected to GPIO-10.
  • You can change any other pin Ex : led = 4; // Get LED GPIO-04 pin; 
  • Note : Code 1 and Two are same application and functionality. Main difference is calling function.

Code 1 :

  • Used GPIO-0 pin (Boot button in NodeMCU Dev Board), as interrupt and used Button interrupt handler function.


Code 2:

  • In this code i was used GPIO-0 pin (Boot button in NodeMCU dev Kit) as interrupt and used interrupt handler function.
  • If your using interruot handler function then you need o enable the interrupt using GPIO.enable_int(pin) function


if you have any queries call us +918300026060 or WhatsApp Dismiss


Your Cart

%d bloggers like this: