Constructing Mobile Device Application to Interact with Modular Robotics Toolkit over Bluetooth®
As technology becomes increasingly accessible, the medical field is developing new approaches and creating miniature, non-invasive medical capsule robots (MCRs). With advanced technology in the medical field, an interest to extend knowledge in technology to young adults and children arises. Current open source architecture, STORM Lab Modular Architecture for Capsules (SMAC) for MCRs, has recently been developed . SMAC provides hardware modules and software architecture to establish connections from outside sources for an easy and accessible implementation of MCRs. SMAC can enable communication and data transmission between MCRs and computers and commands can be sent from users to specified MCRs . The current SMAC robot is ideal for various applications (medical, educational, commercial) because of its open source accessibility, solderless hardware components, personalization, and its easy construction through magnetic contacts, with replaceable modules. The possibility of incorporating SMAC into an educational kit to result in a spark of interest in technology in children and young adults arises and can be achieved by integrating the SMAC robot with an engaging learning tool and an entertaining game.
The goal of this work reaches beyond a current interest in technology and into capturing the interest of the next generation. Many products that have been produced provide innovative technology to capitalize on recent initiatives in STEM-based learning and increase interest in technology in young adults and children. VEXRobotics® has initiated interest in high schools participating in the program while LEGO Mindstorms EV3® has drawn attention from the younger aged children , . However, limitations applying to the present products are the lack of open source technology and expensive products. On the other hand, SMAC provides an open source technology for their consumers as well as learning strategies and concepts. SMAC has the potential to surpass its potential competitor, VEXRobotics, if placed in the market as an educational tool to spark interest for the next generation and expose young minds to new possibilities.
Once communication to the SMAC robot has taken place, implementing the proposed educational kit in the market will allow open access for the public to enjoy the SMAC robot and meet the specific user’s needs. Furthermore, it has potential to impact the generation as a product to encourage technological interest in young adults and children. This would be achieved by providing a user friendly, engaging, and educational tool.
MATERIALS AND METHODS.
Bluetooth and Robot Communication Setup.
In order to have feedback interaction achieved, additional JSON commands were added to the IAR code derived from the same class. Feedback communication requires additional commands for the robot to interact with the application. The SMAC robot will be receiving JSON commands from the Bluetooth application and also send the added JSON strings to the Bluetooth Application. A second added JSON string was set to send an immediate command string to the application indicating movement or no movement from the robot. According to the feedback, a visual representation is shown in progress within the application.
Graphical User Interface Development.
By analyzing pre-existing projects from Anaren, a fundamental idea was established to control a robot through the graphical user interface. The Robot sample found under the help menu of the Anaren Atmosphere Developer Tool was used as a base layout for the project. Adjustments in the graphical user interface to add images and complex buttons to work in cooperation with the Code View code were achieved by mimicking properties in the images to be visible when pressed and invisible when released. However, the interaction between the robot and the application needed to be adjusted to communicate between the UARTs. The preexisting UART class in the Anaren code suite allows the application to write via the UART port. This class was able to write on the UART port to send commands to the SMAC robot as a common command line. The commands executed were the JSON strings the SMAC robot read (Supplementary Figure 2). UART command functions, connected and in disconnected functions, were added for a user to distinctively and visually recognize if the robot was connected. These commands turn on an LED light located on the SMAC robot when a successful connection has been made and turn off the LED light when the connection has been lost. Commands were designated to their button function in the Code View window in the Atmosphere Anaren as the graphical layout was programmed in the Designer View.
Feedback was analyzed when a button is pressed, sending a JSON command to the AIR_UART_Write function where it is received in the SMAC’s RX buffer, this is seen in the Tera Term, and executes to command. Once the SMAC robot receives the command, it sends out a command stating whether its motors are off or motors are on. It is then retrieved by the application as feedback by calling the RX using AIR_UART_RegisterRXCallback library class. Once it reads the string, it uses the library class of ATMOSPHERE_NotifyFunction to notify the phone and send the string to the phone, the application in the phone should analyze whether the motors are on by specifically reading the last character. According to the feedback, the image of the SMAC robot in the app would rotate its tire 40 degrees until the application read the motor command as off.
A computer was used as a power source for the MSDB. Once codes were uploaded, the application was tested using two different SMAC robots, each connected to their own phone via Bluetooth. Feedback between the application and the BLE Module are received and transmitted via Bluetooth. JSON commands are interpreted in the application when received (Figure 1). The BLE Module is connected to the SMAC robot via 802.15.4 Wireless programming preexisting in the current SMAC Module.
Figure 1. Diagram of the communication between the Smartphone and SMAC robot is visually represented. A battery module is always needed for power source to the Bluetooth module and base module. JSON commands are sent to the Bluetooth module. The Bluetooth module sends the JSON command through a channel specific to the Base Module.
Anaren’s Atmosphere Tool Development allowed for the construction of a friendly graphical user interface application (Figure 2). The SMAC robot image was added for visual feedback. When feedback is returned from the SMAC robot to the phone application, the wheel of the SMAC robot image rotates consistently to the right until feedback indicates there is no motor movement on the SMAC robot.
Figure 2. Phone application screenshot. The arrows function as buttons a user may press to command the SMAC robot’s movement. The SMAC robot image on the bottom left corner is the visual representation of feedback the application receives. The visual code was constructed under the code view.
In addition to the graphical interface, Anaren Atmosphere provides a connection window allowing the user to scan all Bluetooth devices and select the device desired as shown in Figure 3. The Development Tool allows the user to customize the Bluetooth chip’s name which will be shown in the connection window in the application once the Bluetooth chip is on. Once a user selects his/her device, the device is connected to the smartphone and the other users may be unable to connect to this specific device.
Figure 3. Connection screenshot the application provides. A user selects the desired Bluetooth module named according to the robot it pertains to.
Multiple tests were executed to determine all necessary elements processed correctly in the application (Table 1). JSON strings, command lines, were executed properly and the SMAC robot moved according to the command sent. Feedback was distributed back to the application and the application represented it in the SMAC robot’s wheel.
Table 1. Results of the independent tests conducted. Each objective’s test was described and processed correctly on the application.
|Sending JSON Strings||Adding a button functionality to the app and sending the string when pressed/released||JSON string appeared in the terminal of the receiving port (SMAC Robot)|
|Movement||Once the string was sent, the SMAC robot would translate it as a command||The SMAC robot would move according to the string|
|Feedback||A second JSON string would be sent to the App indicating movement or no movement||The command would appear in the application|
|Visual Representation||According to the feedback, the image of the SMAC robot in the app would move its tire||When the robot moved, the wheel would rotate indicating feedback and vice versa|
Anaren’s Atmosphere was successful in providing the base software environment for the creation of the phone application. The Bluetooth hardware module also provided the Bluetooth connection platform in the SMAC robot when connected. The application had two dual windows for the Bluetooth connection and the SMAC robot control buttons. The dual windows graphical interface is user friendly and pre-established by the open source Anaren software. By default, the connectivity window is in the application when connection button is pressed. SCAN and CONNECT buttons are present and the Bluetooth Modules are listed.
All functionalities were carried through the Anaren’s Atmosphere Tool. All necessary functions were successfully implemented (Table 1). The feedback of the SMAC robot and the commanding JSON strings being sent from the buttons pressed in the application were successfully established. Anaren’s accessibility as open source technology was successfully used in the development of an open source application to control an open source robot, SMAC robot. This open source availability differs from already existing products, VEXRobotics and LEGO Mindstorms EV3, that limit the exposed content either on copyright or affordability . By maintaining the open source fundamental aspect, the SMAC robot and application far pass the present products by allowing options for teaching and engaging students through customizability.
Adding feedback of different sensors to the application would be ideal to establish a fully working application taking in consideration all aspects of the robot. The SMAC robot itself offers modules of different sensors that could be easily incorporated into this application. These sensors include temperature sensors, accelerometers, gyros sensors, barometer sensors, battery life sensors, etc. . All aspects of the robot would be encompassed in the application for ideal teaching purposes and engaging users.
Applying the fully working application and SMAC robot to classroom environment settings to teach coding or engineering will be looked into next. The first step to establish the product in classrooms will be to have funding to construct the SMAC robots and in providing the material. Targeting how the product will work to teach students will be looked at as well. Because of the product’s open source establishment, how the product will be used as teaching modules will be analyzed. A variety of lesson plans and tutorials will be constructed to engage students in technology and also learn from the engineering aspect.
Establishing the application and SMAC robot as a product for the potential to be distributed would also be ideal to raise the engaging aspect of technology. The product would be greatly distributed continentally and possibly internationally increasing the fundamental learning and engaging aspect of technology.
The Bluetooth Application was created successfully in an open source platform. Commands to the robot are received and feedback from the robot is retrieved in the application triggering the wheel movement on the app. The Anaren Atmosphere Development Tool is in need of improvement for the consistency of maintaining created projects. Over time, the website begins to tweak the applications it has saved in its server. However, in building and providing a user-friendly, engaging, and educational tool, in this case, the application and SMAC robot should still fundamentally encourage technological interest in young adults and children.
I would like to especially thank Ashley Peck, who was a part of this project, for her tremendous help and patience; my mentor, Ekawahyu Susilo for his guidance; Dr. Valdastri and the STORM Lab for giving me the opportunity to contribute in their research; and Dr. Weeden-Wright and the SSMV for their support and establishing me with this opportunity.
Figure S1. Diagram of the Bluetooth module from Anaren Atmosphere is being implemented in the connection between a Smart phone’s application to the SMAC robot.
Figure S2. JSON executable commands featured in the SMAC robot IAR code.
- Beccani, E. Susilo, C. Di Natali, P. Valdastri, SMAC — A modular open source architecture for medical capsule robots. International Journal of Advanced Robotic Systems 11, 1-16, (2014).
- VEXROBOTICS-Innovation First www.vexrobotics.com (2002).
- Mindstorms-The LEGO www.mindstorms.lego.com (2013).
- Low-Power Bluetooth Smart Development Kit from Anaren-BROADCOM. anaren.com/airforwiced/anaren-bluetooth-smart-development-kit (2015).
- Anaren Atmosphere-BROADCOM. anaren.com (2006).