Conor Gleeson - Iteration 4
Iteration 4
Cloudboard
The above image shows a Dfrobot Cloudboard which we utilised to setup an MQTT server to facilitate communication between our Microbits and our phones. We used Beebotte to host the server.
This section sets up the autentication for the server. The server type is set to Beebotte and the ids are set to allow access to the server. The configuration for WIFI access is also set here along with the topics for the server.
This loop continuously polls each Microbit this can be adjusted and changed as the number of clients change. The leds are toggled for each client to show the message being sent.
This sendToNode function is called by the loop to send values from phones to the Microbit.
This parse function underwent several modifications and trials in order to get the message to parse correctly.
The remainder of the server board code remained unchanged.
The client code remained unchanged toggling leds on recieving an message and sending the roll value as a respone if the recived message corresponds to the client number.
Issues Encountered
There were several issues encountered throughout this iteration.
- Wifi Issues - We discovered that the Cloudboard connot connect to Iphone hotspots with the cause being unknown. The solution was simply to use the hotspot from an android phone. When one was not avalible we could connect to the college WIFI by hotspotting from a laptop. This itself had some issues in that it tended to drop more often than a phone hotspot but it was useable.
- Cloudboard issues - early on we had problems using a Cloudboard V2, this was not explored as we just switched to using the V1 but it may be worth looking to see if it can be got working.
MQTT App
With the server and clients succefully communicating we could set up the MQTT app to show the values being sent from the clients to the server and also to send values from our phones to the Microbits.
Above is the interface of the app. The log at the top shows the value of each Microbit client as they are polled by the server. The slider is used to send values to the client which is displayed on the matrix display on the Microbit. The bar graph displayed the roll values of each client and the guage graph displayed a chosen clients value.
The setup for each panel is shown below
With this done the values of the clients can be viewed in the app and values can be sent from the app to the client as shown in the videos below.
IFTTT
Using the IFTTT app the possibilities for using the Microbit-Beebotte server combination are basically unlimited. To test and gaine xpirence with the app we implmented the Microbit with Gmail. By pressing the A button on the Microbit we sent an email to Jason to invite him into the room to take a look at our progress.












Comments
Post a Comment