IoT JumpWay Intel® Edison Basic LED Example

Version 2

    IoT-Jumpway.jpg

     

    INTRODUCTION:

     

    Here you will find sample device scripts for connecting Intel® Edison 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

     

    SOFTWARE REQUIREMENTS:

     

    • TechBubbleIoTJumpWayMQTT

     

    HARDWARE REQUIREMENTS:

     

    Edison-Hardware.jpg

    1. Intel® Edison.
    2. 1 x LED.
    3. 1 x 220 ohm Resistor
    4. 2 x Jumper Wires
    5. 1 x Breadboard

    BEFORE YOU BEGIN:

     

    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 EDISON:

    To help secure your Intel® Edison, follow the Intel® Edison Security and the Intel® Edison Booting From SD (Linux) guides.

    CLONING THE REPO:

    You 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-Intel-Examples.git

     

    INSTALL REQUIREMENTS:

     

     

    $ cd IoT-JumpWay-Intel-Examples/Basic-LED/Python
    $ pip install --upgrade pip
    $ pip install -r requirements.txt

     

     

     

    SETTING UP YOUR EDISON:

     

    Edison-Blinking.jpg

     

    First of all you need to connect up an LED to your Intel® Edison. To connect the LED you will need a breadboard, a 220 ohm resistor, and two jumper wires.

    1. Place the LED on your breadboard.
    2. Connect the short leg of the LED to pin 5 of your Intel® Edison using a jumper wire.
    3. Connect one end of the resistor to the long leg of your LED.
    4. Connect the other end of the resistor to the 3v output of the Intel® Edison.

     

    DEVICE / APPLICATION CREDENTIALS AND LED SETTINGS:

     

    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.

     

    Device-Creation.png

     

    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 LIVE DATA:

     

    Each 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.

     

    SensorData.png

    WarningData.png

     

    ISSUES WITH THE DEVELOPER PLATFORM OR CODES:

     

    Please feel free to create issues for bugs and general issues you come across whilst using the IoT JumpWay Intel® Edison Examples. You may also use the issues area to ask for general help whilst using the IoT JumpWay Intel® Edison Examples in your IoT projects.

     

    https://github.com/TechBubbleTechnologies/IoT-JumpWay-Intel-Examples/issues