What if you want to be able to control the LED both via Website and Serial?
This is where low.js shines. Everything is done asyncronly, so you can just paste the content of both
/index.js together, remove duplicate lines such as duplicate requires and one of the two
let state = 0; lines, and it just works.
Interfacing sensors and modules
A great IoT project needs more than just an on-board LED. For example, to build an autonomous car, you most probably would interface:
- One motor via motor driver for driving forward or backwards and braking
- One servo motor for the steering
- Distance sensor to detect walls
- GPS module
This is what microcontrollers like the ESP32 are made for. To educate yourself, you have the following options:
- If you want to learn about the basics of electronics and how to interface things thoroughly to be able to build great devices, please take a look at the neonious IoT Electronics Kit.
- For a documentation on the available API to interface the ESP32 peripherials, please take a look at the low.js for ESP32 API documentation.
- For some more examples and some selected drivers to interface things, please take a a look at our examples GitHub repository.