Twitch, Ubidots and Xinabox - Kevin Power #4
Introduction
Following on from last week, we looked into getting a Ubidots video feed working via twitch and then moved on to tackling integrating a Microbit onto Ubidots and into the system.
Ubidots Video Feed
After the work performed last week I thought about just streaming a video to a live streaming platform online, we decided to look into using twitch as the link from the camera feed up to Ubidots via an IFrame. After a bit of work we managed to get this working successfully, we got a video feed from my laptop going up onto twitch then onto the Ubidots Platform. However, it was very slow, and constantly refreshing or freezing, which would not be good enough for our use case with the USV, this delay and freezing of the video was probably down to the hardware and network connection, but the potential of the video feed going down in the middle of the water was to great to pursue this further.
Microbit & Xinabox
We decided to take our success of getting it working and move onto the next area of the project, incorporating Microbits into the USV and getting data from a Microbit to Ubidots.
To achieve this, we are going to use Xinabox. Xinabox is a product range of xChips that can easily be snapped together and connected to the Microbit. This makes Xinabox really useful for our project, additionally Xinabox is partnered with various IoT platforms including Ubidots. It was a technology our project lead found while doing research on different IoT Cloud Dashboards, it looked really promising to use. He ordered the chips in, making sure to get two of each in case of unforseen circumstances.
Once we had the Xinabox xChips we connected all the different parts together and put the Microbit in. It was now time to do some programming in MakeCode, to test to see if we could get these to work.
MakeCode
Firstly, I had to install the extensions into my MakeCode for the different xChips we were using. These were mainly the SN01 xChip for GPS and the CW01 for Wifi, the extensions were difficult to find as they are not easily searchable on MakeCode and we needed the exact names for them to show up (Xinabox/pxt-CW01 and Xinabox/pxt-SN01).
When it came to actually programming the MakeCode it seemed straightforward so we first attempted to get it working on one of my classmates machines. This was not working and we did some troubleshooting, eventually we decided to run the program on my laptop so I made a program (Image shown below of code) and it ran perfectly with no issues.
Comments
Post a Comment