We are a student club at ÉTS that creates drones and we brought some pieces with us without having precise goals. While brainstorming, we thought it would be great to mix together software and electrical engineering so we were inspired by the famous Twitch plays pokemon, a community-driven game, in which people are adding their input into the Twitch chat and then the bot will parse it and convert it into real command.
What it does
Our project has two main programs. The first one is a parser of Twitch messages that use an IRC-like protocol to communicate with Twitch. The last one is about the software who is running on the Pi. It's a server who listen to the parser command broadcast and apply them to the aeroglider's servos. We currently have 4 commands:
- Forward (makes the aeroglider move forward) (alias: f)
- Left (makes the aeroglider turn to the left) (alias: l)
- Right (makes the aeroglider turn to the right) (alias: r)
- Jump (allows the aeroglider to jump using the propellers power) (alias: j)
If you go to https://www.twitch.tv/richerlariviere, you will be able to add your input while we are doing our demo. You will see a live-feed of the aeroglider and the possibility ton interact with it using the chat. From this twitch link![channel], you will see the twitch parser code. We used the native Sockets from Python standard library.
How we built it
We decided to go step-by-step. Half of our team worked on the software part. The other built from scratch the aeroglider using cutting-edge technology (a.k.a cutters, duct tape and tears).
Challenges we ran into
We had many challenges! We had troubles to get the wifi to work on the rasberry pi, we had some difficulty to get the server-side of the TCP connection working, we also were missing some pieces to create the aeroglider and had to go to ÉTS to get what we were missing a couple of times. And after that, we had to deal with motors inconsistencies (unstable motors). The Pi does't support easily 4 motors on its GPIO pins. We felt like astronauts having problem in-space regarding our fuel expense. During the tests, we almost emptied all our batteries. We are not sure if we will be able to fly our beast but we are plenty of hope.
Accomplishments that we're proud of
We're proud of being able to get the messages sent on Twitch and interpret them as command for the aeroglider. Twitch can be a little tricky when it comes to deal with his service programmatically. Twitch is based on IRC but it has some difference we took time to be awared of.
Also, we were very happy when we fixed our wifi problem. McGill wifi is non-conventional and pretty unstable sometimes so we had to deal with it.
What we learned
We learned how to use TCP with a web socket to be able to connect to the rasberry pi. We learned that the best mindset is to never give up.