Work in progress, i'm late and nothing works yet, but here I am at the point.
For the hexiwear contest, I wanted to test the device and mix it's capabilities for a funnier fitness activity tracker. I was luckilly chosen to the free giveaway for the device.
The idea is to pack the Hexiwear at the center of a ring of addressable LEDs (a.k.a NeoPixels), and give it the look of Iron Man's arc reactor.
The device will be chest mounted with an elastic band, like cardio training devices, the pixel ring will be animated according to the effort level. a second demo/chillout animation will run using the sensors and try to give a representation of the wearer's mood.
I bought the docking station for development, but got stuck a long time with it, as I'm using windows 10, it broke the station bootloader. Fortunately, I was ableto use another FRDM-K64 board I had as a programmer, via the station SWD port, as explained in this page : https://mcuoneclipse.com/2013/04/21/using-the-freedom-board-as-jtag-programmer/. There still is a problem, I can't use the debugging that way, I have to code blind :-\.
Setting up the basic blocks :
I was inspired by two already existing projects :
First, an Adafruit tutorial for making the actual LED ring look like the ARC reactor : Super hero power plant
Second, the REP Hexiwear project on Hackster.io : https://www.hackster.io/user462411/rep-hexiwear-313c10?ref=part&ref_id=19472&offset=12 I want to read directly the sensors data, and combine heart rate, accelerations and temperature to deduce an effort level, and display it by varying the intensity and color of the LEDs.
To take in hands the Hexiwear, and with my problems with the docking station, I made some experiments with mbed compiler, and then moved to Kinetis Design Studio to start from the existing Hexiwear software and build my app on top of that, adding an extra menu.
I followed this tutorial to create the menu icon graphics : https://www.hackster.io/keithmitchell/drawing-images-on-the-hexiwear-oled-3c9517. File creation was OK, but integration in the code is complicated, and I lack time to analyse how it works. I manage to have a compiling code with addition of the new menu ressources, but haven't found the way to bind and display it yet in the menu.
Managing the LEDs : after experimenting in mbed, including the mbed "EasyNeo" library to drive NeoPixels. The library is using SPI to simulate the driving timings of the WS2812 LEDs. The library is not from stock compatible with the MK64, but worked on a FRDM_K64F with little mods. Once basic testing done, as the dev board has the same µC as the Hexiwear, I copy-pasted the lib.
Remains to use the functions to make everything glow as expected.
To connect the Hexiwear, for test purposes, I used the doscking station to power the LEDs, and a level shifter to step-up the 3.3V output to 5V.
Comments