The T1 C2000 Launchpad paired with a custom breakout board has been created in the SE423 mechatronics class at the University of Illinois. One of the lab projects that the class went through is enabling the launchpad to drive around. Using motor controllers on the breakout board we are able to attach Motors and wheels too make the launchpad drive around. the exact configuration of our vehicle is a front caster wheel and two rear wheels together providing the ability for the Ford 2 drive and turn. in the lab setting, drive commands are issued to the board via teraterm over a USB connection to the launchpad. ever since completing the lab I have wanted a better way to control the vehicle with more freedom. no matter how long the cable connecting the computer to the launchpad is, the movement is inherently limited. the idea to use Wi-Fi to control this vehicle was a natural choice and I began investigating my options for this final project.
the hardware used to connect to the Illinois guest Wi-Fi network is an orange PI0 that can hold a Wi-Fi connection, running Linux to enable the use of custom codes written in C, and transmitting and receiving information over its built-in UART chipset. the board was perfect for the task, and with some startup code from Dan block along with the application etcher to get the code onto the orange pie, the setup to drive the launchpad around wirelessly was underway.
Once the orange Pi is connected to the Illinois guest network, it can be controlled over putty and have codes uploaded to it over a companion application called WINSTP. Using this, I am able to make and modify a code, that when running is able to receive different character or numeric commands and output a string of values over the serial D communication to the launchpad. the string of characters that the orange pie puts out begin with a signature exclamation point and end with a dollar sign. once issued, the launchpad is able to look for these specific characters as the start and end of a command.
Within the serialrxd function of the final project C code listed in the code section of this project there is an array that is filled every time characters are received over that serial Lane. the beginning of the array is always an exclamation point and the end is marked by the presence of a dollar sign. after this array is filled we are able to scan the array for float values that can be used as the information of the command when controlling the launchpad. for example, when the user commands the launchpad to turn he hits the Q button on the laptop which is sent to the orange pi. Once inside the orange Pi, that value is converted to !-1$ and sent to the launchpad. launchpad then creates an array of that value and scans it for float values and finds the information of negative one. that negative one value is interpreted in CPU timer 2 using an FL statement to increment the turn rate by ACE at value. all of the commands are interpreted this way.
By creating several if loops for different numeral values to be interpreted as driving vehicle information, the launchpad is able to be driven around in the same manner as it was in lab 6.
Comments
Please log in or sign up to comment.