**There is a document in the google drive folder on the main page of my personal project with the same content as typed below**
Thursday, November 8, 2018:
Today was the first day of officially working on my personal project. It seemed overwhelming at first, so I just familiarized myself the general process and materials. Maxine has a daily journal on her digital portfolio, so I read through that to get a sense of the timeline. I have all my part except the accelerometer, which should be here in a couple of days. However, it doesn’t seem like that will prevent me from advancing. I have to also figure out how the gymnast will wear this device. My tentative plan is to sow it into a compression sleeve that goes around the heel and ankle.
Friday, November 9, 2018:
I continued to review the plans for this project and started to go through her code. Maxine has done a fabulous job documenting her work, and although it looks like a complicated project, I’m glad that I have guidelines to follow. It appears as though I need to download some adafruit libraries, which I will do on Monday. One major difference between our projects is my use of an accelerometer instead gyroscope. She used a device that was a accelerometer, gyroscope, and magnetometer in one, but I have only an accelerometer.
Monday, November 12, 2018:
On the Adafruit website, I browsed the page on the Adafruit Flora Bluefruit LE. It provided instructions on how to download the library which I think I successful did. Tomorrow I will figure out how to add the specific Flora Bluefruit LE board on Arduino, and then I will be ready to start coding. One thing I stumbled upon that might become an issue is the voltage of the battery I got. It says that the Flora Bluefruit uses 3.3 v but I have a 3.7 volt battery.
Tuesday, November 13, 2018:
I have added all the libraries I need for my project from GitHub to Arduino including the BluefruitLE nRF51, LSM202DLHC, and Unified Sensor (for the accelerometer). Also, I added Adafruit boards to the Boards manager, so that Arduino is compatible with the Adafruit Flora board. My plan for tomorrow is to do the hardware setup and work on my project management.
Wednesday, November 14, 2018:
When I went to work on the hardware setup today, I discovered that I had overlooked a crucial component. The Adafruit Flora Bluefruit does not have hardware serial support, so I could not connect it to the computer using a micro USB. Therefore, I could not program it in Arduino IDE. Although it’s slightly inconvenient, all I need to do is order a microcontroller (i.e. Adafruit Flora) to supplement the Bluefruit.
Thursday, November 15, 2018:
Because I am waiting on the Adafruit Flora to come in, I worked on my project management and timeline. The Flora should come in today, so that I can work on the hardware setup tomorrow.
Friday, November 16, 2018:
I found a Flora in the Fablab, so I assembled the hardware setup. For the set up, I used alligator clips to connect the accelerometer to the Flora and the Flora to the Flora Bluefruit. To connect the accelerometer to the Flora, there were alligators clips going from gnd → gnd, 3.3 v → 3.3v, SCL → SCL, and SDA → SDA. To connect the Flora to the Flora Bluefruit, alligator clips connected gnd → gnd, 3.3v → 3.3v, RX → TX, and TX → TX. The last part of the hardware setup was connecting the Flora to the computer. Because the Flora Bluefruit doesn’t have a USB port, it is used with a microcontroller. The red light lit up on the Flora Bluefruit, telling me that it was getting power.
**As a cautionary step, I also used a multimeter to measure the resistance of the alligator clips. If the resistance was close to 0, the alligator clips were good, but if the resistance was infinite, that meant that there was a break in the alligator clips and it needed to be tossed out.
Monday, November 19, 2018:
First thing first, I tested the accelerometer using an example code. Because I’m using a different sensor than Maxine, I used a different example code called “accelsensor” from the Adafruit LSM303DLHC library. On my digital portfolio, there are pictures and videos of this working. Basically, as I moved the accelerometer, the values would change on the serial monitor. Although I need to figure out the range of the values, I was happy to see that everything worked as it should. The only issue I ran into was the error message about no device being found, but this was easily resolved by checking and securing the alligator clips. For this test code, it wasn’t necessary to be connected to the Flora Bluefruit since the Flora was directly communicating with the sensor.
Tuesday, November 20, 2018:
Because I need to be able to make the Flora Bluefruit talk to my phone, I looked up the example code that I needed from the Adafruit BluefruitLE_nRF51 library. Under the Overview page for the Flora Bluefruit LE, there are several pages of example codes where it walks you through the code. I started with the “BLEUart_cmdmode” code which lets Arduino talk to a Bluetooth Low Energy central device. In my case, this device will be my iPhone using the Adafruit Bluefruit LE Connect app. I didn’t run the code today, but I did start going through the configuration page using this tutorial.
Monday, November 26, 2018:
I have downloaded the Arduino software to my personal laptop so that I can work on it at home. I also had to download the libraries and add the Adafruit boards to my board manager. However, after I did all those preliminary steps, I had Arduino up and running and communicating with the Flora. I will probably continue to work on my laptop even at school so that I don’t have to worry about saving and uploading copies to Google Drive. Today, I continued to work on the bluetooth component of the project and finally got the phone and Arduino talking back and forth. The key step in getting it to work was uncommenting the line Adafruit_BluefruitLE_UART ble(Serial1, BLUEFRUIT_UART_MODE_PIN); and commenting out the other lines of code for software serial, hardware SPI and software SPI. I’m not really sure why. On my google sites, there are pictures and videos of the working code.
Tuesday/Wednesday, November 27-28, 2018:
Since I’m a little shaky on what exactly each line of code does, I am going back through each line and making sure that I understand what the acronyms stand for and how the Flora and Flora bluefruit are communicating. I have learned that TX and RX are the communication pins from the Adafruit Flora to the Flora Bluefruit and that SPI (serial peripheral interface) is the interface used to send data from master (Flora) to slave (Flora Bluefruit). SCK and SDA are the clock line and data line respectively. All devices on the 12C bus are connected through these wires. I am really confused why in the configuration page we define pins for SPI chip select, interrupt request, and reset because I don’t know what pins to use and where I connect it to the Bluefruit. Maxine ended up using an Adafruit Bluefruit feather, eliminating the need for a microcontroller, so her code doesn’t have anything about this. However, she does use SPI in her code to connect the Bluefruit feather to her sensor. Also, I don’t know why I comment out the Bluefruit SPI ble line in the code.
Thursday, November 29, 2018:
Today I took one step back to figure out the AT command example code. This is a basic code to execute AT commands and see it appear on the serial monitor. I actually ran into problems with this code because first, it wouldn’t factory reset, and second, it kept saying 'BLUEFRUIT_HWSERIAL_NAME' was not declared in this scope. I realized that I had to change the “BLUEFRUIT_HWSERIAL_NAME to Serial1 in the line Adafruit_BluefruitLE_UART ble(BLUEFRUIT_HWSERIAL_NAME, BLUEFRUIT_UART_MODE_PIN); because that’s what I defined it as in the configuration page. After I figured that out, I worked through the tutorial page and successful got it to work. See my digital portfolio for pictures.
Friday, November 30, 2018:
Throughout the week, I have gotten the accelerometer and bluetooth to work separately, but for my project to work, I need all of it to work together. I think I need to copy and paste the different example codes that I have been working with into one code, but it gets complicated because codes can’t contradict one another. The first time I tried to verify my code, it gave me an error message that had to do with the void setup, which means that the order in which the code was pasted wasn’t compatible. Also, I think that I need to define variables from the other example codes in the bleuart_cmdmode configuration. I still don’t know how to define the CS, IRQ, and RST pins. Mr. Dubick has an electronics guru coming in next Tuesday, so maybe he will be able to help me. After I get the values to show up on my phone, I can work on setting the range appropriate for my purpose.
Tuesday, December 4, 2018:
Today, Mr. Jeremy Proffitt came in and helped me with my code. The first thing he did was made sure he understand what I was trying to do, which ironically helped me get a better understanding. He drew a simple diagram that showed the communication lines. First, the accelerometer talks to the Flora, then the Flora talks to the Bluefruit, and lastly, the Bluefruit talks to the phone. After we outlined the plan, we set out to get each part working separately. I had already gotten the accelerometer test working between the Flora and the accelerometer (accelsensor) and the communication between the Flora and Bluefruit working (bleuart_cmdmode). When I tried to show him the codes, they did not work, but it turned out it was because the connections were not secure. Once we fixed the alligator clips, I got readings from the accelerometer and could talk back and forth from my phone to the Bluefruit.
Mr. Proffitt explained to me the difference between SPI, I2C, and regular serial. For regular serial, you have to determine the baud rate whereas SPI and I2C sets their own baud rate.. The Flora uses SPI to communicate with the accelerometer through SDA and SCL. The Flora Bluefruit uses serial hardware to talk with the Flora through RX and TX. This helped to explain why I had to comment out the SPI line in the bleuart_cmdmode code because instead of using SPI, I am using regular serial (Serial1).
Next, we made a copy of the bluetooth code, so that we could add lines from the accelerometer code to it. Mr. Proffitt was very helpful and gave me some valuable advice. He suggested that I go line by line and make sure that I understand what’s the purpose of each.
My next steps will be extracting the information I want to show up on my phone and coding the mathematical calculation needed to get force.
Wednesday-Thursday, December 5-6, 2018:
On Wednesday we heard Mr. Fletcher Gregory, Mr. Adam Hawthorne, and Mr. Tom Balke about the progress of our school construction and were able to ask them questions.
On Thursday we talked with visitors from Cisco and presented our projects to them. Later that day, I attended a Women in Stem lunch which they hosted on campus. They had women from all over the world talked about their careers and gave us advice about being women in a male-dominated field. It was an amazing experience and a well-organized event.
Friday, December 7, 2018:
When I was researching how use conductive thread, some questions materialized, which I jotted down below. Since I have never sewed before, I had to learn the basics first, and then, I had to worry about shorts and the different paths to each component. Maxine’s workflow contains a good step by step process of sewing the components on, but I needed an even more basic breakdown of threading techniques and terms like running stitch. I also realized that the article I chose for the gymnast to wear with the components is stretchy, posing a possible problem in the future. Its elasticity will also make sewing more difficult. I have brought sewing materials home in case it snows on Monday and we do not have school.
Monday, December 10, 2018:
We had a snow day today, but I started sewing my project at home. Maxine sewed her Flora Bluefruit Feather and gyroscope into a vest and ended up having to sew an extra layer of fabric so that she could sew another path underneath the vest layer. In contrast, the pins on the Flora and the Flora Bluefruit were designed to match up with one another, so I didn’t need multiple layers. I first set out to connect the gnd of the Flora and the gnd of the Bluefruit, but it turned out poorly, for the thread crossed over itself in many places. I decided that I didn’t want to risk shorting my circuit from the outset, so I cut all the thread out and started over. This first attempt, however, gave me some practice with the needle and thread. Tomorrow, I will try again.
Tuesday-Thursday, December 11-13, 2018:
During these three days, I sewed my components into the compression sock, which the gymnast will wear to test the device. Although it isn’t ideal for a gymnast to wear extra stuff while actually training, it will be fine for the proof of concept. I discovered that this part of the project was more challenging than expected and required careful attention. The shape of the sock made it harder to sew than an open piece of clothing would have since I couldn’t puncture both layers. Therefore, I had to sort of work inside the sock and frequently turn it inside out. It was also important that I kept the starting end of the thread out of the way so it wouldn’t get knotted and tangled with the rest of the thread. There was a couple of time when the needle got unintentionally threaded through the threading of the sock and I had to cut it loose. All in all, this was no easy task. I poked my finger at least a dozen times and I spent a lot of time undoing mistakes, but I eventually got the hang of it. Finally, I brushed clear nail polish over the knots to prevent them from coming undone and snipped off any extra thread. Using clear nail polish and keeping the ends short should limit the opportunity for shorts to occur.
Friday, December 14, 2018:
I successfully got my Flora Bluefruit to work while sewed into the sock and connected to the Flora and accelerometer by conductive thread! This made me really excited since I don’t have to troubleshoot the wiring of my project. Once I finished the four connection between the Flora and Flora Bluefruit earlier this week, I plugged in the power source, and both components lighted up, signalling that both were receiving power. This gave me assurance that I was on the right track and that nothing was wrong with the thread or paths. Today when I finished connecting the accelerometer and tested the code, it told me that the accelerometer was not connected. Fortunately, after I traced all the paths to the accelerometer and cut the excess of thread off, it worked. One of the untrimmed ends must have been causing a short. Having never sewn before, this was a major milestone and accomplishment in my book.