Got me 2 sets of LittleBits (Space Kit & CloudBit Starter Kit)
Wanted to see how the CloudBit API works and how to integrate it with some data.

Thought of 2 main ideas:
1) display temperature in Tel-Aviv
2) display My Blog’s error rate from New Relic

The steps:
1) use the power + CloudBit + number modules to display the weather in tel aviv / application’s error rate

2) write a short PHP (GitHub) wrapper for the CloudBit api to easily send output to it.

Send output to CloudBit: (this will send 0-99 to the CloudBit output)

3) pull some data and send it to the cloudBit using the previous script

Get Temperature from Yahoo:

Get my blog’s error rate from new relic (for the previous 30 minutes)

Put it all together:

3) using a cron job on the machine the PHP script will run every minute updating the display.

Done! now the cloudBit is displaying the current temperature in Tel-Aviv (Fahrenheit) or error rate from new relic. next step is to print some dashboard for this.


Share Button