In my previous post ESP32 and Mongoose OS - Intro  I showed how to connect to an ESP32 using Mongoose OS and setting up the WiFi.


In this post I want to do something more useful, and control NeoPixels.


yesterday I showed Flashing the device with either of the inbuilt demos, but you can simply select the Com Port and Platform and then close the window by hitting done.


Connection Issues

I had some issues yesterday when I was playing around, and today I decided to try some things to see if I could resolve it.


For some reason it worked to flash and communicate, then wouldn't work, and was locking up the browser and wanting mos to be restarted.

There are three possibilities.

  • Poor cable/connection
  • USB port clashing
  • Driver issue

I looked at the cable and it was a good quality one and the device seems to connect snuggly.

I changed USB ports, just in case.

When I plugged the LOLIN32 in, windows loaded it's own drivers, and so I downloaded the Silabs driver and installed them (yes and did the obligatory reboot ... why does windows require it?)


So hopefully I've resolved my connection issues ...




Apps and Flashing

First order of the day is to download an App that has most of it done for you.


Click on Import and after a few seconds the list populates.

If you click on the Name it opens a new tab in the github repository for that project.


I scrolled down and found one called "example-neopixel-js"

Click on the Import button and it gets added to the list under My Apps


Clicking on the App and then the dropdown shows the list of files in the App.

Scroll down to init.js and adjust to suit your neopixel.


The init.js has a few settings.

In my case I have 16 neopixel ring and I've stayed with GPIO5.


Click the save icon (next to the File List dropdown, and it saves it to My Apps.


You can Flash it to the device by clicking on the lightning bolt just under the Dashboard.

The Device Logs show the progress.



Device Files

It is also possible to manipulate the files on the device.


On the left side is a collection of tabs, and under Device Files

Sometimes you may need to Refresh File List.

Clicking on the init.js allows you to manipulate it, and then save it back onto the Device.


There is the option to Save and Reboot, or you can press the reset button and it will act on the new file.

This leaves your My Apps files intact while you experiment ...



Next Step

My next step is to become a little more familiar with JavaScript.

I need to allow remote manipulation of the Neopixel before I reveal my cunning plans.






Intro        ESP32 and Mongoose OS - Intro

Issues     ESP32 and Mongoose OS - Issues