This is an (early stages) in-progress project to integrate an AdaFruit MagTag with an analog wall clock to display indoor/outdoor temperature and humidity, indoor air quality, weather forecast, and maybe some other stuff.
Pressing different buttons on the MagTag will display different information.
Here are some articles/tutorials/guides that we might end up using for instruction and inspiration:
- Hello World
- Cat Feeder Clock
- Showerthoughts and Quotes
- Slideshow
- Language Flashcards
- AdaBox 017
- Daily Weather Forecast Display
- Displaying Temperature and Humidity
The following hardware and software are required for this project.
This project uses the following hardware:
- AdaFruit MagTag (I used the MagTag Starter Kit, which includes magnet feet, display frames and hardware, and a lithium-ion battery in addition to the MagTag itself)
- AdaFruit BME688 (Pressure/Humidity/Temperature/Gas Sensor)
- AdaFruit SGP30 (Air Quality Sensor)
- STEMMA QT cables for connected the sensors to the MagTag (x2)
- A USB C cable and 5V 2A power supply
In addition to the code in this repository, the following software is required.
We're using CircuitPython on an AdaFruit MagTag. For information on how to get CircuitPython installed and ready-to-use on the MagTag, follow the instructions in the AdaFruit MagTag guide up through the "Welcome to CircuitPython" steps.
There are many optional libraries available for CircuitPython. They are all available at https://circuitpython.org/libraries.
The following CircuitPython libraries are required by this project (just copy them into the "lib" folder on the MagTag):
- adafruit_bitmap_font
- adafruit_display_text
- adafruit_imageload
- adafruit_io
- adafruit_magtag
- adafruit_portalbase
- adafruit_bme680.mpy
- adafruit_fakerequests.mpy
- adafruit_miniqr.mpy
- adafruit_requests.mpy
- adafruit_sgp30.mpy
- neopixel.mpy
- simpleio.mpy
This code repository includes a secrets.py file with mostly blank values for secrets that will need to be configured/populated in order for the code in code.py to work properly.
Secret Name | Secret Description |
---|---|
ssid | Your wireless network name |
password | Your wireless network password |
This project uses io.adafruit.com to get the current date and time based on the set timezone
Secret Name | Secret Description |
---|---|
aio_username | Your username for your io.adafruit.com account |
aio_key | Your API key for your io.adafruit.com account |
timezone | Your local timezone (see http://worldtimeapi.org/timezones) |
This project uses the OpenWeather API to get current weather and forecast information. For the basic functionality that this project uses, a free account is sufficient. You can set that up at https://openweathermap.org/api.
Secret Name | Secret Description |
---|---|
openweather_token | Your openweather API token |
latitude | Your local latitude value |
longitude | Your local longitude value |