Skip to content

Diferent programs

OtavioJFOliveira edited this page Aug 26, 2020 · 1 revision

Introducing the different programs developed

There are different programs for ESP32 available in this project, in this topic will be presented the functions of each code. Inside the samples folder of the LiquidGalaxyController library there are the following files

\Arduino-Controller-master\LiquidGalaxyController\examples

ACELEROMETER_METRIC

This code is extremely simple and has the purpose of adjusting the readings of the accelerometer sensor, according to the user's movements, the change values of the X and Y axes can be used to improve the performance of the controller glove, the data observed with this program should be noted and, if necessary, changed in the following codes related to the Controller Glove, replacing the value of the following variables found in the sketch:

xLimitUP, xLimitDo, yLimitUP, yLimitD

Controller_Serial

Controller_Serial, this code is intended for use with the controller only connected to the Liquid Galaxy master pc via the USB-Serial port, the controller will work only if the USB cable is connected.

Controller_Socket

Controller_Socket, this code can be used in case the user needs to change the IP of the main machine or the network data such as SSID and Password during the tests, using this sketch the user can use the Network Info page of the Android application to make these changes. WARNING: Using this sketch, the voice command group change indication LED will be flashing, signaling that the controller is not connected to the WiFi network and the master pc, until the user enters the necessary data, after entering the data the led will go out, indicating that the controller is connected.

Controller_Socket_FixedNetworkInfo

Controller_Socket_FixedNetworkInfo, this sketch can be used in case the user has a fixed WiFi network and does not need to change the SSID, password and IP data of the Liquid Galaxy master pc. In this case, the user needs to enter this data into sketch before uploading it to the controller. After sending the sketch, the controller will start and automatically try to connect to the data reported in the sketch, the controller can restart a few times until the connection process is complete, in case of no connection after 2 minutes open the sketch again and check if the data have been inserted correctly.

GlovesControl_Serial

GlovesControl_Serial, this sketch should be used when the user wants to control Liquid Galaxy using the USB cable with Serial communication. In this case, just upload the sketch to the controller glove and connect it to the Liquid Galaxy master pc using a USB cable, then run the SerialServer python Script.

GlovesControl_Socket

GlovesControl_Socket, this sketch works in the same way as Controller_Socket, with it the user has the freedom to change the SSID, PASSWORD and IP data of the master computer, remembering that the Controller glove and the master pc must be on the same network. 

GlovesControl_Socket_FixedNetworkInfo

GlovesControl_Socket_FixedNetworkInfo, using this sketch the user needs to enter the network and IP data of the Liquid Galaxy master pc only once, but this data cannot be changed during the operation. In this case, the user needs to enter this data into sketch before uploading it to the controller. After sending the sketch, the controller will start and automatically try to connect to the data reported in the sketch, the controller can restart a few times until the connection process is complete, in case of no connection after 2 minutes open the sketch again and check if the data have been inserted correctly.

Voice_Recorder

Voice_Recorder, This sketch should only be used on the Controller and NOT on the controller sleeve. This sketch is EXTREMELY IMPORTANT! In order for the voice module to work correctly it will be necessary to use this sketch to record and train all the commands previously, how to use: Perform the upload of the sketch to the controller, to record the voice commands related to each key on the matrix keyboard, just press the key where you want to record the command and view the Arduino IDE Serial Monitor the correct time to speak the command and in then repeat it so that it can be stored in the memory of the speech recognition module. Advice: To facilitate the use of voice recognition, it is advisable to record the commands by saying the name of each key on the matrix keyboard, for example:

For key 1 record the command: ONE

To key "A" record the command: A

This will facilitate navigation if the user chooses to change the navigation list using the examples available in the android application or using a custom list created within the application. Remembering that these commands need to be recorded only once and are not lost when the controller is turned off. You can replace the commands at any time, to do so just load this sketch back to the controller and re-record the command for the desired key, or all the commands if you prefer.