Inspiration

I am an avid gamer, who enjoys his online multiplayer games such as League of Legends and Overwatch. Or, at least I was. Packet loss has made the experience less enjoyable, and is sometimes painful to play with. The internet connection is extremely volatile depending on the time of day and location on campus. My dorm has especially bad internet compared to other parts. Through complaining, I will slowly, but surely, annoy IT to improve the internet.

What it does

Tweets @UMassAmherstIT if ping, download speed or upload speed are not up to par. Includes passive-aggressive mockery.

How I built it

The script was written using python, with help from tweepy to access the Twitter API and pyspeedtest to measure internet speed/ping. I initially played around with tweepy in another project, but that did not give me a satisfactory product by the start of Sunday. Switching topics was not too challenging, as I had some experience with tweepy already. pyspeedtest was an extremely simple tool that got the job done. Lastly, it was set so that the bot wouldn't spam tweets by putting in sleeping time after each check/tweets.

Challenges I ran into

Initially, the script was meant to run on a Raspberry Pi 3b. Getting onto the internet (eduroam) was quite the challenge. Had to go to an obscure guide found here. After spending hours figuring that out, we soon found out that onboard wi-fi adapter had a maximum download speed of 20, far under the threshold of what is considered slow in the script. To circumvent that, we tried a USB wireless adapter. Both turned out to be insufficient. The script, at least for now, is stuck on my laptop.

Accomplishments that I'm proud of

Before the hackathon, I did not really know Python. I had experience in Java from classes, but had no experience in anything else. The first day of the hackathon basically consisted of me learning Python from the ground up. While the product consists of less than 50 lines, I wrote so many more learning how Python works. This is my first script, and while simple, works as intended.

What I learned

Well, Python. Also, Python has a LOT of libraries/packages, which are really useful. It is very liberating to be able to code without objects everywhere.

What's next for BadInternet Bot

Hopefully, I can get a Pi with a wireless dongle that supports my computer's speed so the script can be run as intended with accurate complaints. I may want to find a way to measure packet loss, which is what inspired the project, but I never came up with a way to do this.

Built With

Share this project:
×

Updates