This week, I have officially finished establishing the UWB connection between the two iPhones. After establishing a connection, the two iPhones can now transmit live position data to each other, representing their relative locations. This is currently in the form of 3D coordinates (x, y, z), logged onto my computer’s terminal.
The code for the UWB live location updating can be found here, in a new branch: https://github.com/rosel26/basket-buddy/tree/uwb
I’ve also started working on the server that connects the receiver iPhone and the Raspberry Pi. I plan to use Bonjour and TCP. The planned process is as follows:
- Pi runs a TCP server, accepts the TCP connection, and receives the JSON position data
- iPhone receiver discovers the Pi via Bonjour, sends a new payload every update
According to our Gantt chart, my progress is still behind schedule, as I should have the preliminary person following functionality working by this point. A challenge I faced was establishing a stable connection between the two iPhones, and it took more time than I expected to research the frameworks I had to use.
For this week, I will focus on integrating the UWB output with the Raspberry Pi to start inputting position data into the cart control system. This involves establishing a communication link between the receiver iPhone and the Raspberry Pi as specified above. Once that connection is established, the next step will be to translate the location data into motion commands. If the robot control system and Teensy interface are ready, I will look into and work on converting position coordinates into velocity and directional commands to enable the Teensy to control the cart’s movement to start following the person (and their iPhone).
