Here you will find sample device scripts for connecting Intel® Galileo Gen 1 to the TechBubble Technologies IoT JumpWay using the Python MQTT Library. The codes allow you to set up a basic device that allows control of an LED, and an application to communicate with the device and make the LED flash on and off. Once you understand how it works you are free to add as many actuators and sensors to your device and modify your code accordingly.
Python Versions- 2.7
- 3.4 or above
TechBubbleIoTJumpWayMQTT
- JSon
- Intel® Galileo Gen 1.
- 1 x LED.
- 1 x 220 ohm Resistor
- 2 x Jumper Wires
- 1 x Breadboard
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 link and check out the guides that take you through registration and setting up your Location Space, Zones, Devices and Applications.
TechBubble Technologies IoT JumpWay Developer Program (BETA) Docs
Preparing Your Intel® Galileo Gen 1To help secure your Intel® Galileo Gen 1, follow the Intel® Galileo Security guide.
Cloning The RepoYou will need to clone this repository to a location on your Intel® Galileo Gen 1. Navigate to the directory you would like to download it to and issue the following commands.
$ git clone
Install Requirements$ cd IoT-JumpWay-Intel-Examples/Intel-Galileo/Basic-LED/Python
$ pip install --upgrade pip
$ pip install -r requirements.txt
Setting Up Your Galileo Gen 1First of all you need to connect up an LED to your Intel® Galileo Gen 1. 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 5 of your Intel® Galileo Gen 1 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 Intel® Galileo Gen 1.
- 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": 5
}
}
"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 time your device detects a person or an intruder, it will send data to 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 Sensor/Actuator page and the Warnings page to view the data sent from your device.
Please feel free to create issues for bugs and general issues you come accross whilst using the IoT JumpWay Intel® Galileo Examples. You may also use the issues area to ask for general help whilst using the IoT JumpWay Intel® Galileo Examples in your IoT projects.
IoT JumpWay Intel® Galileo Examples Contributors
Comments