Lora Radio Shield
Thanks to this open source project which uses the Raspberry Pi as Lora gateway and Arduino as Lora node device. We port this project to pcDuino and send the received data from Lora node to LinkSpriteIO. The basic architecture is shown as the following diagram.
There is an Arduino Lora node to read the sensor's data and send it to pcDuino Lora gateway. After pcDuino Lora gateway recevice the data and it will send it to LinkSpriteIO which is our IoT cloud.
The following content, I will introduce the details of how to DIY a low-cost Lora gateway with pcDuino and Arduino.
pcDuino lora gateway
- pcDuino8 Uno x 1
Arduino lora node
- Arduino Uno x 1
1. Assemble the hardware
- According to the following pins map table to connect the lora module and pcDuino or Arduino
Arduino Lora node
pcDuino Lora Gateway
2. Program Arduino Uno
- Download the Arduino program from github
- Use Arduino IDE to open the Arduino_LoRa_node project in examples folder
- Upload this program to Arduino Uno
- Open Serial Monitor to check the message
3. Program on the pcDuino8 Uno
Create device on LinkSpriteIO
- Go to www.linksprite.io and sign up
- Enter your Email and password to create a new account
- Go to My Account to get your own API Key.
- Click My Device, and choose Create DIY Device.
- Click the created device icon and get the DeviceID **.
Download the source code
- Access to the pcDuino8 Uno Ubuntu system Note: user name and password are all: linaro:
git clone https://github.com/YaoQ/pcduino-lora-AP cd pcDuino-lora-AP/pcduino-gateway make
- Use your own deviceID and apikey to update the line 27 and 28 in LinkSpriteIO_Post.py
26 # Use your own deviceID and apikey 27 deviceID="xxxxxxxxxx" 28 apikey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
To make it simple, we just use random number to simulate the temperature value and send it periodically to pcDuino lora gateway. Then pcDuino Lora gateway will post data to LinkSpriteIO.
./pcduino-gateway | python LinkSpriteIO_Post.py
On Arduino side:
On pcDuino side:
On LinkSpriteIO side: