As with all of these types of projects, it's a learning lesson since we have not been taught many of the skills/techniques needed for each specific project. However, this course has taught us to problem solve and be resourceful, so by applying those skills, we can overcome the challenges that we face.
One of the first mistakes that I made was not realizing that I needed a microcontroller (Flora) in addition to the Flora Bluefruit. The Bluefruit does not have hardware flow control pins, making it difficult to use by itself. At the bottom of the Adafruit page on the Bluefruit, it does recommend a microcontroller with hardware serial support, but apparently, it just didn't register in my mind when ordering materials. Luckily, I found a Flora in the Fab Lab, or else I would have had to wait a couple of days until Adafruit shipped it and it was delivered, delaying my timeline.
When I began working on the code and used alligator clips to connect the components temporarily, I ran into more problems. First of all, the alligator clips got very frustrating the longer I had to use them. They kept sliding off the pads, and their connections were unpredictable. The whole hardware setup was unwieldy to manage and was the cause of many error messages that I received. These error messages, however, were easily resolved by readjusting the connections. Once I had permanent conductive thread connections, this no longer was a issue.
By far the hardest part was the coding aspect. Since I had never dealt with bluetooth or multiple components, I had little understanding of the communication methods used in this project. With a lot of research and browsing of the Adafruit forums, I was able to get a better grasp of SPI, clock and data lines, slave vs master, and IQR, RST, and CS. However, it wasn't until Mr. Proffitt explained the type of communication that each of the components used did this make sense. He told me that from the Flora to the Bluefruit, there is a regular serial connection using the Rx and Tx pins, so the SPI pins, which were causing me much confusion, were irrelevant. I documented everything Mr. Proffitt taught me under the December 4 journal entry.
Sewing the components onto the compressive sock was also a challenging task since this was my first time sewing. I learned what a running stitch was and how to thread a needle. The shape of the compressive sock did not make it any easier because the needle could not puncture through both sides of the sock, so I had to operate the needle on the inside of the sock. It was also crucial to keep the paths from overlapping, meaning that I had to pay extra attention to where I pushed my needle through the fabric. It turned out to be a very tedious task, but it was satisfying when I didn't have any shorts and all my connections worked.
The most recent problem that I have not yet fixed is the part of my code that makes it necessary for the serial monitor to be opened for the factory reset and initialization of the code to begin. It appears that Maxine had the same issue with her code and had to add a sprintf function into her code. If I cannot figure it out by myself, I might ask Mr. Proffitt for guidance.
Most of the important decisions I had to make occurred in the planning steps of my project. First, I had to decide which wearable electronics would work best. Things I had to consider included size, complexity, and how old they were. If I used a part that came out several years ago, 1) there would probably be a better option available with more functions and 2) the help forums would not be as helpful, for so much can change in a short amount of time. Also, I didn't need an extremely complex part, especially because this was my first time working with wearables. Lastly, I wanted something small so that it wouldn't get in the way of the gymnast. In the end, I chose the Adafruit Flora and Bluefruit because they were designed to work together and both were new products.
Another part of my design that required some thought was how would the gymnast wear this device. Gymnasts need to be able to forget that it is even there. Furthermore, the article chosen should not affect movement, mobility, or traction. I decided on an compressive sock that goes over the ankle because some gymnasts wear accessories like it for ankle support or heal pains. Also, I thought that the device needed to be close to the point of impact, so the lower down on the body it was attached the better.
Completing a long project like this project takes determination, good time management, and self-discipline. After working on the same project for several weeks, I just wanted it to be done, especially when things were not working and frustration was creeping in. When giving up seemed appealing, I reflected on how far I had come and how close I was to the finish line. Furthermore, when it seemed like I was putting in a lot of time but wasn't progressing, I remembered what Mr. Dubick said: a project is going to take a certain amount of time, so when you're putting in the work, you're contributing to those hours. Moreover, organizing a long project taught me the importance of time management. The project timeline provided a good outline of the steps and milestones throughout the process and made me consider how long each task would take. This project timeline and task analysis can be found here. Most importantly, a long project requires discipline. Because you don't have to "turn anything in" before the final product, you have to keep yourself accountable by achieving each milestone on time and using your time wisely in class. Sometimes, you have to be willing to work at home, like I did, on things that don't need to be done at school so that everything can get finished.
An important lesson that I learned was not to be afraid to ask for help. Without Mr. Proffitt, figuring out my code would have taken triple as long to complete if I could get it at all. Nonetheless, Mr. Proffitt did not do the work for me nor gave me all the answers. He actually asked me more questions than told me what to do. It turned out that I understood more than I thought I did and that coding is pretty intuitive. The flip side to asking for help is being resourceful and problem solving, which are equally important. On my own, I did a lot of research about SPI and UART in order to understand what was actually happening between the components. I also used several Adafruit help forums to troubleshoot the configuration.
There are a couple of improvement that I would like to make before I call my project complete. First of all, something in my code mandates that the serial monitor be opened before the Flora can send the acceleration values to the Bluefruit. Demonstrated in a couple of videos in my workflow and in the video below, the factory reset and initialization of the Bluefruit occurs only after the opening of the serial monitor. Consequently, the middle step of the serial monitor presents a problems when I want to use the device disconnected from the computer. I have tested the connections, and the components sewed into the compression sock can be powered by a lithium ion battery, but it doesn't work unless it first goes through the factory rest and initialization, which requires Arduino's serial monitor. Maxine ran into the same issue when working on her project, so her documentation on how she fixed it will hopefully help me. Mr. Proffitt is coming back in January, so he might be able to assist me too. Also, to make the data more analytically friendly, I would like to add to my code a force calculation and a description of the numbers printed, so the user knows what each number represents instead of reading a jumble of numbers. A little more research into the compass sensor that I am using might help with this.
Extending this project even farther, I would like to investigate correlation between injuries and the force of continual impact on a gymnast's body. This information can then be used in an athlete's body maintenance and prevention of injuries. I can also envision the same concept behind this project being applied to other contact sports and helmets to measure the impact of a falls.