WeDo Internet of Things
The use of the LEGO WeDo 2.0 is limited to the WeDo software, which is very graphical and simple in nature, allowing children to easily use the system. However, the WeDo can only communicate back and forth to the WeDo software and nothing else. By using the WeDo Software Developer Kit, we aimed to make the WeDo data more compatible with `other platforms, including LabVIEW and ThingWorx.
We created preliminary LabVIEW drivers with similar functionality to the LEGO Mindstorms LabVIEW blocks. We created one block (WeDoReadSensors.vi) that can read a specified sensor's data, and return that as an output. We also created a LabVIEW block to run a motor (WeDoMotor.vi) by simply taking an input of motor power from 1-100.
These blocks work with the WeDo provided that a command line app is running in the background. This command line app maintains the Bluetooth connection between your laptop and the WeDo Brick. It also continuously monitors what components are plugged into the WeDo as well as outputs sensor data to a text file, which is accessible to the LabVIEW blocks.
The current version of these blocks uses local text files to transfer data between sources. The sensors write to a text file and the LabVIEW blocks read directly from the text file to get sensor values. Similarly, the motor block writes to a text file, and the Xcode program running in the background reads that value directly from the text file and writes it to the motor.
Using these LabVIEW drivers, we were able to successfully communicate sensor data back and forth between the WeDo and ThingWorx, an Internet of Things platform that can be used to manipulate data.
With more time, we hope to develop a similar system with TCP/IP communication rather than reading/writing files in order to make the product more robust and less file intensive. In addition, in the future we hope to create blocks for other actuators supported by the WeDo Brick, including the Piezo buzzer and the RGB LED. Lastly, we hope to experiment more with interfacing the data with ThingWorx to flesh out the full potential of this LabVIEW/IoT interface.