A few more items need to go in the secrets.py file described on the prior page.

In addition to WiFi network credentials and timezone, our veggie code also needs:

  • aio_username and aio_key matching your Adafruit IO credentials. If logged into your account at adafruit.com, click the “IO” link in the top navigation bar, then “My Key.”
  • location is the 2-letter postal code for your state, in quotes: e.g. 'NY' or 'TX'.

This currently only works for the lower 48 United States. Information for Alaska, Hawaii, and non-US countries is not present in the dataset.
secrets = {
    'ssid'         : 'WiFi-Network-Name',
    'password'     : 'WiFi-Network-Password',
    'aio_username' : 'Your_Adafruit_IO_Username',
    'aio_key'      : 'Your_Adafruit_IO_Key',
    'timezone'     : "America/New_York",
    'location'     : 'NY'
}

After editing and saving secrets.py, tap the reset button and within a minute or so you’ll see some veggies!

If the project does NOT start up: most likely the WiFi credentials are incorrect, or something is wrong with the secrets.py file syntax…make sure every quote, comma and colon is there and in the right place.

This guide was first published on Dec 07, 2020. It was last updated on Dec 07, 2020.

This page (Configure Location) was last updated on Sep 02, 2021.

Text editor powered by tinymce.