top of page
Sentences Xbox.png

Talking in Sentences

This was a partner project for my robotics class. The objective was to write asynchronous code and get multiple methods of serial communication working between two different Picos. We accomplished this objective by having our Pico send UART communication to itself, send messages in morse code and decrypt them using a light sensor, and decrypt morse code input on the gamepad controller buttons. I had covid during this assignment, and as a result we had one pico talk to itself so that my partner and I could work on the project separately.

UART Communication
In our program you can select UART as a communication method and with each method sent you will be prompted to send a response from the secondary UART channel.

Screenshot 2024-01-21 at 12.38.21 AM.png

Gamepad Morse Code Button Inputs

The provided Python code demonstrates how to convert button inputs from a gamepad into Morse code and then decode it into text. By using a dictionary to map button inputs to Morse code symbols, the game_to_morse() function converts the button log into Morse code. Then, the morse_to_text() function converts the Morse code into readable text. The example provided shows how the button log 'AAAABAAXAAAABAYBYABYABAYBAAAA' is converted into the text "HI HANNAH". 

IMG_1224 2 (1).jpg

Fun Box!
We designed this box to look like an xbox controller and incorporated our game pad into its design. The top is laser cut and the sides were 3D printed. Additionally, the led is integrated into the xbox logo.

Joystick and Accelerometer
For this assignment, we got our accelerometer and joystick reading values, but didn’t find a use for these values in our communication. We found that the buttons were a more straightforward method of communication for the user, so once the accelerometer and joystick were functional we moved on to tackling other challenges. 

Screen Shot 2023-09-18 at 10.01.03 PM.png
Morse LED_edited.jpg

LED Morse Code Decrypting
In our second option for serial communication, you can enter in a message and our LED will flash the message in morse code. This can then be decrypted by the light sensor so that the other Pico can receive the message. In our situation, we had the same pico do the decryption, but this decryption was still asynchronous so the light sensor could read while the LED was flashing. 

bottom of page