• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » How to Setup Node.js (low.js) on Windows for ESP32

By Abhishek Ghosh April 6, 2019 6:57 am Updated on April 6, 2019

How to Setup Node.js (low.js) on Windows for ESP32

Advertisement

Low.js is a port of Node.js and Has Certain Requirements to Run. Low.js developed by a company named NEONIOUS who has own ESP32 board (which you may purchase). Commonly, when we say ESP32 then we mean ESP-WROOM-32 based board. However, for this guide that ESP-WROOM-32 based board will not work. We need ESP32-WROVER based board. ESP-WROOM-32 does not have the 4 MB PSRAM required for low.js. Wrover modules have PSRAM that the Wroom does not. PRAM essentially allows your programs to use 4MiB of RAM more, and another 4MiB you can use too. With the Wroom you would only have the 500-ish Kb of internal memory. There is also speed difference of ram (133 vs 144 mhz). ESP32-WROVER based boards of course more modern but bigger and costs higher than ESP-WROOM-32. ESP32-WROVER modules has either a PCB antenna or an IPEX antenna. This means your ESP32-WROVER board have 4MB FLASH and 4MB RAM. It’s CPU is dual-Core Tensilica LX6 240 MHz. Incredible amount of RAM. 4MB in embedded projects usually not needed which actually the reason to use ESP WROOM 32 more for other works. WEMOS has a ESP32-WROVER board with battery port, SD card slot whose clone is sold by China. At least for now, you will find node.js IoT guide for Raspberry Pi more. You can actually port some of them ESP32-WROVER board. WROVER is less used, you can see this chart on Wikipedia :

Vim
1
2
3
#
# https://en.wikipedia.org/wiki/ESP32#Development_and_other_boards
#

 

Steps of Setup Node.js (low.js) on Windows for ESP32

 

First install Node.js by downloading Windows MSI package from the official website :

Vim
1
https://nodejs.org/en/

After installation finishes, launch Windows Command Prompt and type the below commands to check whether node and npm installed :

Advertisement

---

Vim
1
2
node -v
npm -v

It is practical if to have esptool installed but not written on docs as requirement (probably the dependency gets installed) :

Vim
1
pip3 install esptool

If you get output without error after issueing node -v, npm -v commands then run this command to installed the required tool :

Vim
1
npm install -g lowsync

It will take some time to get installed. Attach your ESP32 to the PC and determine the number of COM port it is attached, it is for our testing was COM6. As hints how to guess COM port number, easiest way is to launch Arduino IDE if your ESP32 is configured with Arduino IDE. Else launch Windows Device Manager and check port.

Next, issue this command :

Vim
1
lowsync flash COM6 --init

Watch this output to appear :

Vim
1
2
3
4
5
C:\Users\abhishekghosh>lowsync flash COM6 --init
*** Step 1/3: Probing ESP32 microcontroller
esptool.py v2.6-beta1
Serial port COM6
Connecting.....

Press the boot button on ESP32 board. Else you’ll end up with this :

Vim
1
2
3
4
5
6
7
8
9
C:\Users\abhishekghosh>lowsync flash COM6 --init
*** Step 1/3: Probing ESP32 microcontroller
esptool.py v2.6-beta1
Serial port COM6
Connecting........_____....._____....._____....._____....._____....._____....._____
 
A fatal error occurred: Failed to connect to Espressif device: Invalid head of packet (0x08)
 
An error has occurred: Cannot read MAC address of ESP32 chip. Please check connection!

How to Setup Node-js low-js on Windows for ESP32

If everything is fine, the flash will proceed :

Vim
1
2
3
C:\Users\abhishekghosh>lowsync flash COM6 --init
*** Step 1/3: Probing ESP32 microcontroller
    now checking if it is an ESP32-WROVER... (takes a while)

You can tell your device to connect to your existing Wifi by changing the low.js settings with lowsync. Create a new project directory, you can create a file named index.js with this content :

Vim
1
2
3
4
5
6
7
8
9
10
11
let gpio = require('gpio');
gpio.pins[1].setType(gpio.OUTPUT);
 
let val = 0, dir = 0;
setInterval(() => {
    val += dir ? 0.03 : -0.03;
    if(val < 0) { val = 0; dir = 1; }
    if(val > 1) { val = 1; dir = 0; }
 
    gpio.pins[1].setValue(val);
}, 30);

LED is connected to pin 1 is directed by two lines:

Vim
1
2
3
4
5
…
gpio.pins[1].setType(gpio.OUTPUT);
…
    gpio.pins[1].setValue(val);
…

Initialize the project by entering the following command in the terminal:

Vim
1
2
3
4
lowsync init
# sync
lowsync
lowsync start

That is it. You should see LED attached to pin 1 having PWM fading. Here is API documentation :

Vim
1
https://www.lowjs.org/documentation/lowjs-for-esp32-api.html

Tagged With esp32 server node js , esp32 node js , esp32 nodejs , esp32 src file node js vscode , low js esp32 examples , low js , https://thecustomizewindows com/2019/04/how-to-setup-node-js-low-js-on-windows-for-esp32/ , vscode esp32 node js modules windows 10 , esp32 nodejs gipo , esp32 node js low js
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to How to Setup Node.js (low.js) on Windows for ESP32

  • General Purpose Guide to Use ESP32 as Arduino

    WROOM ESP32 Dev Board is Powerful Arduino Board With Wi-Fi, Bluetooth. Here is a General Purpose Guide For Pin Identification, Required Changes in Blink Like Examples.

  • Cheap ESP32-CAM Setup With Arduino IDE

    Here is Minor Details of Cheap ESP32-CAM Setup With Arduino IDE. This Combined Module is Excellent to Build Security Camera for IoT.

  • Getting Started with Node-RED for ESP32 Arduino (localhost & IBM Cloud)

    Here is Getting Started Guide with Node-RED for ESP32 Arduino to Learn on localhost & IBM Cloud. Node-RED is a way to visualize data on IBM Watson IoT platform.

  • ESP WROOM 32 : How To Setup ESP32 NodeMCU With Arduino IDE

    Here is Step by Step Guide to Setup on How to Setup ESP32 NodeMCU with Arduino IDE. We Provided Solutions For the Commonly Faced Problems Too.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy