Building the visual aid

Let's build a visual aid where we display the number of steps taken in a given day using an LED strip. The LED strip would light up like a progress bar based on the daily physical activity.

  1. The first step is importing the requisite libraries while building the visual aid. This includes the fitbit and blinkt libraries. We will also import some additional libraries:
       import blinkt        import datetime        import fitbit        import time        import schedule
  1. Make sure that you have the requisite tokens discussed earlier in this section:
       CONSUMER_KEY = "INSERT_KEY"        CONSUMER_SECRET = "INSERT_SECRET"        ACCESS_TOKEN = "INSER_TOKEN"        REFRESH_TOKEN = "INSERT_TOKEN"
  1. A new refresh token is needed every 8 hours. This is a feature of the ...

Get Python Programming with Raspberry Pi now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.