/NTL

Website for a hardware project that displays sensor values

Primary LanguagePython

Website for NTL Hackathon Project

  • Our project uses sensors to detect data like pulse rate, temperature, air quality or location coords.
  • The SIM900 GSM Module allows it to send data over a network.
  • It sends a request to the website. The website uses SQLite to update and redirects back to the main page.
  • Every few seconds, the website refreshes and displays the latest data.

This is the website part of the project, made with Flask. The ugly CSS is by yours truly.

Click here to look at it

The link won't really update anything because the GSM module needs to communicate with it, but if you want to see how it works, you could just send something like this and wait for the webpage to refresh:

https://ntl-2022.herokuapp.com/update/APIKEY=694201a/PULSE=<value>/TEMP=<value>/MQ135=<value>/MQ9=<value>/LOC=<value>

LOC should ideally be longitudinal and latitudinal coords separated with a ,. I added an API Key thing because we were struggling to communicate with the website from the Pi Pico.

It will do something like this:

gif (2)

I want to get rid of refreshing every n seconds (because it makes me think I've given myself a virus or something) and try doing something else (? AJAX maybe), so I'll revist this when I've learnt javascript.