Overview
- Object ID : 4581 (2024-03-12 23:46:19)
- Author : Stephen M Moraco
- Content : Code
- Microcontroller : Propeller 2
- Languages : PASM2, SPIN2
- Categories : Display, Other, Protocol
- Licence : MIT
- Tags : email, Gateway, IoT, Python, Raspberry Pi
Content
This provides a Spin2/Pasm2 object to be run on the P2. The P2 communicates over high-speed bidirectional serial with a connected Raspberry Pi (RPi), which runs a Python script that handles the requests from the P2. These requests provide access to many services, providing a rich internet-of-things (IoT) capability to our P2.
See the system diagram depicting how this all works: System Diagram
Today you can choose from:
- Sending email from your P2
- Controlling your P2 from a web page served from the attached RPi
- Reading data from files on your Raspberry Pi
- Writing data to files on your Raspberry Pi
- Querying configuration values of Pi from the P2
A collection of demos with working code for each can be found at: DEMOs
At the Repository, you can find:
- Full RPi setup and configuration details to get all features of the demo running on your own hardware
- Wiring instructions for the serial communications from the P2 to the RPi
- Configuration instructions for the RPi Apache web server
- PHP-based demonstration web page(s) that shows a display of values received from P2 (and maybe even UI controls that can send values to the P2)
- Both the P2 Object source and the RPi Python daemon scripts
- Example code that shows each of the services being exercised
Version (1.0.0) Release Notes
GitHub repository: P2 RPi ioT Gateway
This capability is referenced in the following forum thread:
Forum Thread: using-a-raspberry-pi-as-an-iot-gateway-for-our-p2-projects
DOWNLOAD: please get this code directly from the repo. as there is both P2 code and Raspberry Pi code there for use.
There are no downloads available for this object.