Padfoot is a activity tracking application for four-legged friends, developed for my Ada Developers Academy capstone project.
You can find a copy of my presentation, including a demo, here.
This repository contains the source code and instructions for building the Padfoot pedometer. Its sister repository contains the code and instructions for building the accompanying Android app.
- 1 Adafruit Feather nRF52 Bluefruit LE board
- 1 ADXL 337 accelerometer
- 1 3.7V lithium ion battery (must be compatible with the plug on the Adafruit board)
- A soldering iron with at least 25 watts
- Solder (a small amount will do)
- 6 wires (half inch or shorter)
- A microUSB cord that will connect the board to your computer
First, you need to establish a reliable connection between the accelerometer and the board's analog pins as follows:
| Accelerometer | Board |
|---|---|
| GND | A5 |
| 3.3V | A4 |
| X | A3 |
| Y | A2 |
| Z | A1 |
| ST | A0 |
You'll need to first solder one end of each of the six wires to the accelerometer, then solder the other ends as diagrammed to the board. Please refer to Adafruit's guide to soldering for further instruction. Remember, its dangerous - you're melting metal!
Last but not least, you can plug in the battery to the black socket on the board.
To install the Padfoot tracker program, you'll need to:
- Download the Arduino IDE
- Clone this repository using 'git clone https://github.com/jacquelynoelle/padfoot_tracker.git'
- Open the Arduino IDE and connect your board to your computer (follow these instructions from Adafruit)
- In the Tools menu, click Manage libraries, and install the
Timelibrary by Michael Margolis (version 1.5.0) and theAdafruit BluefruitLE nRF51library by Adafruit. - Select "Open" from the menu, then choose the padfoot_tracker.ino file from the folder where you cloned the repo
- Click the check mark button to verify the code, then click upload to add the sketch to your hardware
- Click the magnifying glass to open the Serial Monitor
- Get the current time in seconds from here
- Type in T plus the current time into the serial monitor -- the second you hit enter, you're starting the board's clock at that time
- Note that the pedometer won't start counting steps until the time is set
- Unplug the device -- it should now be ready to send step data over Bluetooth LE!
Besides downloading and running the Padfoot Android app, you can also use an existing application like LightBlue to simply test out the Bluetooth LE data stream.