Connecting node-mcu board to mac
- STEPS 2-4 are optional trouble-shooting tips
- Restart Mac
- Press cmd + R - open terminal
- Type csrutil disable
- Getting started and installing drivers and libraries Getting-Started-on-OSX How-to-Program-NodeMCU-on-Arduino-IDE usb-to-uart-bridge-vcp-drivers may be upgrade nodemcu-firmware
- Restart Mac
- A good quality and small nice micro usb wire is required for the mac to detect node-mcu
Confirm if the board is detected by mac:
Compiling and Uploading the program to nodemcu
Execute get-libs.sh to get dependencies in the Arduino sketches folder.
Install ESP8266 libraries via Arduiono IDE’s manage libraries menu.
https://easyiot-cloud.com/
Its a cloud based service which uses easy-iot dashboards to display and monitor state of various IOT sensors, buttons or light-bulbs etc. Free version has limits e.g. max 10 modules.
The rest-interface provided by easy-iot-cloud is abstracted by implementation in git repo https://github.com/iot-playground/EasyIoT-Cloud. Just include this lib in local libraries folder of the project to use them.
Note: The rest interface of easy-iot-cloud and easy-iot-desktop downloaded version on windows or raspberry (using mono) is absolutely different The connection and handing of requests, plus interfacing libs are also different.
Login to https://easyiot-cloud.com/
generate a token and update in the code.
Using lua vs Arduino
to use Lua we uload a firmware that runs like a JS web server and supports lua program to run. One can access this web server after connecting to 8266’s wifi and then
ip:8080??? fix it
- one can upload programs to chip file system via ESPlorer IDE.
- ESPlorer provides access to chip file system and can be sued to debug
- is much faster to upload a small text based lua file and execute it than to compile an arduino program and rewrite the flash
Arduino libs and programs are kind of firmware in itself, that gets flashed to chip each time it is changed, compiled and uploaded.
Various links
- instructable - quite buggy though
- Easy IOT Documentation
- ESP8266 Arduino Core wifi Docs
- get mac address of esp board
- 220 v switch