Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Latest commit

 

History

History
84 lines (59 loc) · 4.48 KB

Technical notes.md

File metadata and controls

84 lines (59 loc) · 4.48 KB

Technical notes

Sensors and actuators

Available sensors and actuators.

Microcontrollers

ESP8266

- ESP-01

  • Exposes only some pins of the ESP8266.
  • Data sheet

- ESP-12E (NodeMCU)

  • Exposes all pins of the ESP8266.
  • Data sheet
  • Pinout
  • Random notes
    • The on-board LED is turned on with the value false(!).

- Sonoff Basic

ESP32

- Widora air

Espruino

  • The binaries and scripts to flash our boards are here.
  • Random notes
    • The ESP-01 and Sonoff Basic need to connect to the PC with an FTDI cable
    • The new FTDI cable is plug and play
    • Problems installing the prolific driver for the old FTDI cable can be resolved.

Espruino Web IDE

  • API reference.
  • I created some pretty useful examples.
  • Espruino uses modules. We can create a central place to host a shared.js module with settings that all things can use. I added a this to the 'Node-RED' story.
  • There are multiple options to run the program when the board starts. The option that works fine for me is the Save on send option Direct to Flash.
  • Random notes
    • Code which causes the board not to respond can be erased by clearing all memory, see flashing folder.
    • Error while uploading script: Uncaught Error: Unable to find or create file can be resoled by require('Storage').eraseAll().
    • Reading the state of a digital pin with digitalRead does not always work when the pin is used as an output pin by digitalWrite, resolution: keep track of the current state using a variable.
    • I prefer to edit code in Visual Studio Code, then I upload the code with the Espruino Web IDE. We can also use this. Did not have time to look into it.
    • Nice to try: analogWrite(D5, 0.5, { freq : 1 }) also blinks an LED.

Things

MQTT

MQTTLens

I run into a lay-out issue when the message payload is JSON. Work around is making the window smaller. :-/

Node-RED