Blog #5 – Continuing to develop an full Input Output system
Displaying Google Calendar Events on a micro:bit Using Flask
Dean Sinnott, 20067691
As a continuation of the previous project, I wanted to minimize my dependency on IFTTT and take full control over the message flow by building my own flask server. This would allow the micro:bit to poll for new messages, instead of relying on delayed webhook chains. My classmate Alex and I worked together to test this new system using Google Calendar events as the trigger.
The task was simple: whenever Alex created a new event in Google Calendar, I wanted that event's title to be displayed on the micro:bit display. We started by creating a webhook applet in IFTTT that would trigger on new calendar events and send a POST request to the Flask server. Flask is a lightweight web server that utilizes python. The server stored the message until the micro:bit asked for it using an HTTP GET request.
To begin, we tested the full flow using a serial connection to the micro:bit. I was at home, far from campus, while Alex was in college adding events. Despite the distance, the test worked perfectly. The event title he entered in his calendar appeared on my micro:bit screen at home. This confirmed that the webhook, server, and polling logic were all functioning correctly.
After confirming the system over serial, we moved on to using the DFRobot cloud expansion board, enabling a fully wireless setup. The micro:bit was programmed to connect to Wi-Fi, send GET requests to the Flask server via ngrok, and display any response it received. This made the project portable and independent from the development machine.
ngrok http --scheme=http 5000). This ensured the micro:bit could connect successfully.This project turned out to be a great demonstration of input and output in a connected system:
- The input: Alex adds a calendar event
- The process: IFTTT sends that event to Flask; Flask holds the message
- The output: The micro:bit polls Flask and displays the message
It clearly showed how cloud services and physical devices can interact through simple protocols to trigger real-world responses and was a pragmatical way to avoid delays from cloud platforms.





Comments
Post a Comment