Section specific for ESP8266 based boards
Board setup
- Install MicroPython or CircuitPython
- Connect to Network
- Start WebREPL service
- Access from BIPES
Basic Blocks
Info
Python
Timing
Machine
Displays
TM1640 LED Matrix
Connect TM1640 LED Matrix Shield or external TM1640 LED Matrix
CLK should go to Pin 14 and DIO to Pin 13 (or what you configured)
Sensors
DHT11/22 Sensor
Ultrasound
GPS
Oximeter
Inertial Measurement
Figure: https://www.electronicwings.com/nodemcu/mpu6050-interfacing-with-nodemcu
OneWire – DS1820
Figure: https://randomnerdtutorials.com/micropython-ds18b20-esp32-esp8266/
Figure: https://randomnerdtutorials.com/micropython-ds18b20-esp32-esp8266/
RC522 RFID Module
Tested with Amica NodeMCU
Connections Diagram:
| RFID Module Pin | ESP8266 Pin |
| SCK | 0 (D3) |
| MOSI | 2 (D4) |
| MISO | 4 (D2) |
| RST | 5 (D1) |
| CS or SDA | 14 (D5) |
Library: https://github.com/wendlers/micropython-mfrc522/blob/master/examples/read.py
Image source: https://www.instructables.com/MFRC522-RFID-Reader-Interfaced-With-NodeMCU/
Foto 1 – montagem
Foto 2 – montagem
Link to example
After making the connections, click on: Load example: mfrc522, connect and run the test program.
Actuators
Communication
Allows BIPES to send email using SMTP services / servers!
Important: For gmail, 2-factor authentication and App Password must be enabled.
Enable here:
Select App -> E-mail,
Select Device -> Other
Use the generated password in BIPES Block Init uMail
Of course, you must be connected to the Internet to send email!
MQTT
EasyMQTT
API
| Parameter | Description |
| Function | listsessions |
| URL | http://bipes.net.br/easymqtt/listsessions.php |
| Method | GET |
| Return | JSON{“success”:true,”result”:[{“session”:”session_id”,”topicsCount”:1,”messagesCount”:2}]} |
| Parameter | Description |
| Function | getsession |
| URL | http://bipes.net.br/easymqtt/getsession.php |
| Method | GET |
| Parameters | session=<session_id> |
| Return | JSON {“success”:true,”result”:[“umidade”,”temperatura”]} |
| Errors | Argumentos inválidos:{“success”:false,”result”:”Invalid Parameters”}Sessão vazia:{“success”:false,”result”:”Session ‘clean_session’ does not contain any topic”} |
| Parameter | Description |
| Function | gettopic |
| URL | http://bipes.net.br/easymqtt/gettopic.php |
| Method | GET |
| Parameters | session=<session_id>&topic=<topic_name>&since=<timestamp[opcional]> |
| Return | JSON{“success”:true,”result”:[{“timestamp”:1605998938,”data”:”0″}]} |
| Errors | Argumentos inválidos:{“success”:false,”result”:”Invalid Parameters”} |
| Parameter | Description |
| Function | publish |
| URL | http://bipes.net.br/easymqtt/publish.php |
| Method | GET |
| Parameters | session=<session_id>&topic=<topic_name>&value=<value> |
| Return | JSON{“success”:true,”result”:”Value ‘1’ published to topic ‘test’ successfully!”} |
| Errors | Argumentos inválidos:{“success”:false,”result”:”Invalid Parameters”} Valor não numérico:{“success”:false,”result”:”Error publishing value ‘a’ to topic ‘test’. Non-numeric input value!”} Erro na publicação MQTT:{“success”:false,”result”:”Error publishing value ‘1’ to topic ‘test’. <some other error here>”} |
| Parameter | Description |
| Function | clearsession |
| URL | http://bipes.net.br/easymqtt/clearsession.php |
| Method | GET |
| Parameters | session=<session_id> |
| Return | JSON{“success”:true,”result”:”Session ‘test’ cleaned”} |
| Errors | Argumentos inválidos:{“success”:false,”result”:”Invalid Parameters”} |