The browser will now display a GUI where you can add and control devices. Since we don't have anything plugged into the prototype board, and nothing is configured nothing is controlled.
Let's add an LED light to the system.
First, we need to select the pins that will be used. We use the WiringPi schematic, but some devices may require BCM numbering. To familiarize yourself, here is a chart along with the pins to orient you:
The diagram lists three different numbers, ones next to the board, ones listed BCM, and WiringPi.
The numbers listed next to the board are the GPIO Pin numbers.
BCM identifies pin numbers on the breakout connector (which are usually labeled on the connector)
Finally, the WiringPi numbers map to the corresponding pins.
Tigase IoT Hub uses the WiringPi numbers to identify pins, so use the map to help you identify which pin you are using.
Adding an LED¶
Plug in an LED light to your prototype board, noting the shorter end (the cathode) should be connected to ground. Run a jumper wire from the cathode to ground, and a jumper wire from the anode (longer leg) to a pin on the board.
Lets select pin 29, which corresponds to pin labeled 21 on the breakout board, and pin 40 on the GPIO pins.
NOTE: You Pin 29 is the WiringPi pin to use when you are entering it into the system
Adding a device to IoT One is very straightforward, and follows the same flow regardless of platform:
Add Device -> Select Category -> Select Device -> Configure -> Add
Now go back to your browser, you should see an image like this:
You should see Hosts: 1, if hosts is 0, you may need to see if framework is running on the device.
Click add device and select the hub you are working with, in this case it should be 'raspberrypi'
Select switch and then pin switch.
Enter the wiring pi number 29, and create a label if you want, like LED.
Once you click submit, it will take a moment and add your device.
Once there, clicking the device gives you options to enable/disable, change name and configuration, or remove.
Go ahead and click enable, and your LED should light up and you will see the status change on the browser.
Congrats, you've just added IoT capability to an LED light!