Home › Forums › Your projects › Structural Health Monitoring with Raspberry PI and Arduino with LoRa › Reply To: Structural Health Monitoring with Raspberry PI and Arduino with LoRa
Hi Ricardo,
EByte E32 are suitable for your pourpuse.
I create a little project with WeMos D1 mini (esp8266) and LoRa E32 to control and fill water tank that have similar behaivor:
- a master with relay to activate pump, a simple oled display to show status an encoder to manage menù;
- a client that is powered by battery that are in sleep mode and have 2 water sensor level.
This devices communicate in this manner
- master send a wake message to a remote E32 that wake up;
- client check water level sensors;
- send current level to the master and go to sleep;
- master receive message and if te tank is not full start pump;
- when client is waked up by max level sensor send a new message to master with the new status and wait for ACK message;
- master receive message stop pump and send ACK.
To manage wake of an Arduino up you can refer to this article Ebyte LoRa E32 device for Arduino, esp32 or esp8266: WOR (wake on radio) microcontroller and new Arduino shield
For Raspberry I don’t have a library, and you have 2 way:
- implement base serial command in Raspberry and use a EByte USB TTLlike so (code is not functional example)
#!/usr/bin/env python import time import serial ser = serial.Serial( port='/dev/ttyS0', #Replace ttyS0 with ttyAM0 for Pi1,Pi2,Pi0 baudrate = 9600, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS, timeout=1 ) ser.write('')
- but I’m going to release a REST server implemented in an esp8266 or esp32 that you can control via GET and POST in this way, and receive messages in realtime via WebSocket
REST server on esp8266 and esp32: introduction
with this base I create this web interface
I think the second way simplify your work a lot, but you must have patience, because I need more time to publish that.
But I’m here if you need more information.
Bye Renzo