I finished this project a while ago but just getting around to writing about it.
Hangboards are a rock climbing exercise tool for increasing finger strength. It's like a pullup bar, but instead of doing pullups, you hang by your fingertips on various sizes of holds. It's great for getting better at climbing, but dreadfully boring. So of course the obvious solution in this day and age is to game-ify it!
I wanted a way of getting real feedback from the hangboard, not just a timer like most of the apps out there. To do this, I found this nifty sensor from sparkfun:
https://www.sparkfun.com/products/9695
This board allowed me to connect up to 11 electrodes and detect changes in capacitance (i.e. skin contact). Here's a crude diagram of the layout:
Hangboards are a rock climbing exercise tool for increasing finger strength. It's like a pullup bar, but instead of doing pullups, you hang by your fingertips on various sizes of holds. It's great for getting better at climbing, but dreadfully boring. So of course the obvious solution in this day and age is to game-ify it!
I wanted a way of getting real feedback from the hangboard, not just a timer like most of the apps out there. To do this, I found this nifty sensor from sparkfun:
https://www.sparkfun.com/products/9695
This board allowed me to connect up to 11 electrodes and detect changes in capacitance (i.e. skin contact). Here's a crude diagram of the layout:
I used the 11 capacitive sensors to detect 11 different holds on the hangboard. A limit switch would tell me whether the board was being weighted or not, because I didn't want the timer to start if I put my hands on the holds but my feet were still on the ground.
The hangboard communicates wirelessly via BLE (bluetooth low energy) to my android phone using an NRF8001 BLE breakout from Adafruit. Adafruit also had a nice little library for configuring and communicating with both of these boards.
The arduino code is very simple, it just polls and queries the state of the capacitive sensors and limit switches. If there's a change in any of the sensors, it writes that out as a 32 bit integerthrough the bluetooth channel, setup like a uart channel (see this tutorial). Each bit corresponds to on/off of a different sensor.
The hangboard communicates wirelessly via BLE (bluetooth low energy) to my android phone using an NRF8001 BLE breakout from Adafruit. Adafruit also had a nice little library for configuring and communicating with both of these boards.
The arduino code is very simple, it just polls and queries the state of the capacitive sensors and limit switches. If there's a change in any of the sensors, it writes that out as a 32 bit integerthrough the bluetooth channel, setup like a uart channel (see this tutorial). Each bit corresponds to on/off of a different sensor.
I did some research to find the best way to implement the kind of games I wanted. When I was pitching the idea to friends, the phrase that piqued the most interest was "guitarhero for hangboarding." Imagine colored lines coming up that correspond to holds. I found a game-engine called unity that could do everything I wanted. There was a bit of a learning curve, but I was able to get it to communicate with bluetooth using a package called bluetooth LE, which was a huge help in writing most of the boilerplate code for connecting to bluetooth. From there, it was a matter of listening for changes to the sensor states and responding to these changes.
The structure of the app is broken out into two subcategories, WORKOUTS and GAMES. Workouts step you through various hanging or pullup exercises. The workout list is populated by parsing through a series of textfiles consisting of lines that describe line by line which holds to use and for how long. Lines can correspond to HANGING, PULLUPS and RESTING.
Code repository: https://github.com/gmkado/SmartHangboard
The structure of the app is broken out into two subcategories, WORKOUTS and GAMES. Workouts step you through various hanging or pullup exercises. The workout list is populated by parsing through a series of textfiles consisting of lines that describe line by line which holds to use and for how long. Lines can correspond to HANGING, PULLUPS and RESTING.
Code repository: https://github.com/gmkado/SmartHangboard