Want to take your first steps into the magical world of the Internet of Things, or want to find out how easy it is to use the IoT JumpWay as your secure IoT communication platform? This tutorial is for you an will hold your hand through setting up your first Raspberry Pi project powered by the TechBubble IoT JumpWay.
What Will We Build ?This tutorial is a simple tutorial that will help you take your first steps to using the TechBubble IoT JumpWay to connect your IoT devices and applications to the Internet of Things.
The tutorial will use TechBubble Technologies IoT JumpWay Python MQTT Library for communication, a Raspberry Pi with an added LED, and an application that can control the LED via the IoT JumpWay.
Python Versions- 2.7
- 3.4 or above
- Jessie
- Raspberry Pi.
- 1 x LED.
- 1 x 220 ohm Resistor
- 2 x Jumper Wires
- 1 x Breadboard
There are a few tutorials that you should follow before beginning, especially if it is the first time you have followed any of our Raspberry Pi tutorials or if it is the first time you have used the TechBubble IoT JumpWay Developer Program. If this is the first time you have used the TechBubble IoT JumpWay in your IoT projects, you will require a developer account and some basics to be set up before you can start creating your IoT devices. Visit the following IoT JumpWay Developer Program Docs (5-10 minute read/setup) and check out the guides that take you through registration and setting up your Location Space, Zones, Devices and Applications (About 5 minutes read).
Preparing Your Raspberry PiTake some time to ensure your Raspberry Pi firmware and packages are up to date, and that your device is secure by following the Raspberry Pi 3 Preparation Doc tutorial.
Cloning The RepoYou will need to clone this repository to a location on your Raspberry Pi 3. Navigate to the directory you would like to download it to and issue the following commands.
$ git clone https://github.com/TechBubbleTechnologies/IoT-JumpWay-RPI-Examples.git
Install Requirements$ cd IoT-JumpWay-RPI-Examples/Basic-LED/Python
$ (sudo) pip install --upgrade pip
$ (sudo) pip install -r requirements.txt
Setting Up Your Raspberry PiFirst of all you need to connect up an LED to your Raspberry Pi. To connect the LED you will need a breadboard, a 220 ohm resistor, and two jumper wires.
- Place the LED on your breadboard.
- Connect the short leg of the LED to pin 18 of your Raspberry Pi using a jumper wire.
- Connect one end of the resistor to the long leg of your LED.
- Connect the other end of the resistor to the 3v output of the Raspberry Pi.
Follow the TechBubble Technologies IoT JumpWay Developer Program (BETA) Location Device Doc to set up your device, and the TechBubble Technologies IoT JumpWay Developer Program (BETA) Location Application Doc to set up your application.
- Retrieve your connection credentials and update the config.json file with your new connection credentials and actuator (LED) setting.
"Actuators": {
"LED": {
"ID": 0,
"PIN": 18
}
}
"IoTJumpWaySettings": {
"SystemLocation": 0,
"SystemZone": 0,
"SystemDeviceID": 0,
"SystemDeviceName" : "Your Device Name",
"SystemApplicationID": 0,
"SystemApplicationName" : "Your Application Name"
}
"IoTJumpWayMQTTSettings": {
"host": "https://iot.techbubbletechnologies.com",
"port": "8883",
"username": "Your Device MQTT Username",
"password": "Your Device MQTT Password",
"applicationUsername": "Your Application MQTT Username",
"applicationPassword": "Your Application MQTT Password"
}
Execute The Programs$ sudo python/python3 Basic-Led-Device.py
$ sudo python/python3 Basic-Led-Application.py
Viewing Your DataEach command sent to the device is stored in the TechBubble IoT JumpWay. You will be able to access the data in the TechBubble IoT JumpWay Developers Area. Once you have logged into the Developers Area, visit the TechBubble IoT JumpWay Location Devices Page, find your device and then visit the Commands Data page to view the data sent from your device.
Please feel free to create issues for bugs and general issues you come across whilst using the IoT JumpWay Raspberry Pi Examples. You may also use the issues area to ask for general help whilst using the IoT JumpWay Raspberry Pi Examples in your IoT projects.
IoT JumpWay Raspberry Pi Examples Contributors- Adam Milton-Barker, TechBubble Technologies Founder
Comments