Knee Rehab Monitor
Engineer | School | Area of Interest | Grade |
---|---|---|---|
Arjun V | Las Lomas High School | Mechanical Engineering | Incoming Junior |
Modification
My addition to the Knee Rehabilitation monitor is an external knee brace that adds hinges onto the main project, and a Servo that pulls my leg in with a switch.
The first step of this modification was to learn how servos are wired and how they work. Servos are motors that can be programmed so they can turn to precise angles or speeds. I required a servo for this modification so I could pull my lower leg in to a specific angle.
<p>Figure 1; About Standard Servo Motors - This image shows the angle a servo can turn to.</p>
Next I wired the servo into the Arduino I used for my main project, and I uploaded some example code which constantly turned the servo back and forth to see the Servo in action. After observing the code, I got a better understanding of how I could code my servo with my main project.
My next step was how I could use a switch to control the Servo. I found a three pin switch, and here I ran into a challenge. I did not understand what the third pin was for. I did some research, and I realized that the two pins that were connected were the pins that belonged to GND and VCC. However, the switch I was using had 3 positions. When it was all the way left the right two pins were connected and when it was all the way right the left two would be connected.
Here, after doing more research, I wired the VCC wire to the left, the ground to the right, and the signal to the middle. This way, the switch could always give a signal, and if the switch was all the way left it would turn the servo on, and if it was in the middle or right, it would turn the servo off. I figured this out by writing some code to make the serial monitor print if the switch was on or off.
My next step was to make the servo turn 180 degrees when the switch was on, and then go back to 0 degrees if the switch was off. I used an if else conditional in the Arduino IDE.
After the code was done, I began my hardware. First, I soldered all the wires in place so they could be attached to my knee sleeve. After they were soldered, I waited for my knee brace to arrive.
When my knee brace arrived, I figured out how I could combine my main project’s circuitry with the external knee brace and hinges, and where I would mount my Servo.
After measuring and drawing it out, I figured that the knee brace was large enough to keep my circuitry exposed, and the only thing I cut was a place for the servo and the string it would pull on.
I decided to mount the Servo on the hinge. I cut out a hole on the cloth holder of the hinge, so I could permanently attach the servo to the metal part of the hinge. After cutting it out, I hot glued the servo to the hinge so it would stay there. I also cut a hole for the string to connect to the other end of the hinge.
Figure 2; This shows where the Servo and string is attached.
Figure 3; This picture is just the hinge, servo, and string.
Then, I wore my knee sleeve, and then wore the external knee brace on top of it.
Figure 4; This image shows the exposed circuitry of the main project, as well as the additional servo.
This modification made it so that I could curl my leg without having to actually curl it. For someone who can't curl their leg due to an injury, this modification could help them a lot with their daily life.
At Bluestamp Engineering, I learned a lot. Coming in, I didn’t know a lot about either software or hardware, and after completing my project I learned a lot about coding for the Arduino, and I also learned a ton about hardware like how to wire things and soldering.
Final Milestone
Figure 5; Final Project - This is is a picture of my final project with the main componenets labeled
Figure 6; Flowchart of My Code - This is flowchart goes through how my code works step by step
For my third and final milestone, my project detects bad squat form. Specifically, when someone’s knee bends side to side, the buzzer produces a different noise than when a squat is too deep. See figure 6 for a flowchart of my code!
To sense the side to side movement, I used an accelerometer. An accelerometer measures translational acceleration in three axes: the X-axis, the Y-axis, the Z-axis (See Figure 15 for example of the axes)
The main form of movement during a squat is the X-axis, and the side to side movement (my knees moving side to side) is in the Y-axis. Therefore, if there’s a lot of side-to-side movement sensed, I categorize as a bad squat. This data is smoothed over time to get a clean signal since there was a lot of noise in the sensor.
My first goal was to track the data of squat form. To do this, I used the serial plotter on Arduino IDE to graph my data in real time while wearing on the knee sleeve. I ran into a minor issue here, where the data would not plot. After some research, I found that there couldn’t be any text attached to the data for it to print. After removing the text code, I was able to use the serial plotter.
Figure 7; Arduino Serial Plotter - This is a side by side comparison of the knee movement of a good squat vs a bad squat. The one on top is a bad squat, and the y value drops below -3.8, which is the threshold for how much your knee should bend in while squatting. The one below is a good squat, and the y values do not drop below -3.8.
When reviewing the data, I noticed that the patterns of the good squat form and the bad squat form on the serial plotter looked almost the same, and it would be very difficult to tell the difference.
After seeing this, I realized that the accelerometer I was using, the MPU6050, was the problem. Its data was very inaccurate with lots of noise and spikes, and it also collected data and reacted very slowly. I decided to replace it with a new accelerometer, the LSM6DS3 + LIS3MDL from Adafruit.
Figure 8; MPU6050 Module 3 Axis Accelerometer Gyroscope GY-521 Analog Gyro Sensors Breakout Board for Quadcopter Arduino Robotics Raspberry Pi Boards and Adafruit LSM6DS3TR-C + LIS3MDL - Precision 9 DoF IMU- This is a side by side comparison of the two accelerometers
I found some code for the new accelerometer in which the buzzer would produce a tone when my knee bent in.
The new accelerometer still had some noise and spikes in the data, so to fix this I learned about sampling the data.
Figure 9; Arduino Serial Plotter - I simulated noise in this graph. Because the spike was so fast, it didn't increase the average of the samples over time
Sampling is when you take a piece of data at evenly spaced intervals to see something about the total data. In my case, I used the samples to get an average of the data in the Y-axis every second, and then I coded it so that if the average is less than the threshold, (which is the point where my knees bend in), the buzzer goes off.
This snippet of code ensures even sampling
void loop() {
beginTime = millis();
//all the rest of my code
TimeTook = millis()-beginTime;
Serial.println(TimeTook);
delay(150-TimeTook); //ensures sampling at 150ms
}
Figure 10; Line charts & sampling time series data sets - This is how sampling works. There is a lot of noise, but by taking samples and getting an average you can get eliminate most of the noise
This works because even if there is a spike in the data, the average of the data per second will still be about the same. But, when there is an actual change in the y axis, (my knees), the average will go down and will cause the buzzer to go off.
I coded the Arduino to take samples and make an average of the Y-axis data, but the new code made it so that the data would not print on the serial monitor. To solve the issue, I increased the baud rate and the data started printing again. The issue was that the bluetooth module could only communicate with the baud rate of 9600, which was much lower than what I previously increased it to.
To fix this issue, I had to change the delay of the void loop in the code, and I also increased the number of samples taken per second and the data started to print again at a baud rate of 9600.
After this, I can connect to bluetooth and still print data, and my buzzer will only go off if I squat too deep, (because of the flex sensor), or if my knees bend inward, (accelerometer). This meant that my main project was complete!
Next, I will be working on my modifications. I am planning on doing an exoskeleton modification, which will help the strength of the user of the knee sleeve. It will be mainly hardware based.
Second Milestone
My second milestone was to add bluetooth to my Arduino, so it could display data on the serial monitor without having to be connected, adding a powerbank to power the whole thing, and then soldering it and attaching it to my knee sleeve.
My first step was to attach bluetooth to my Arduino. I wired it to the breadboard and Arduino, and connected it to my computer. I wired VCC to +5V, Ground to GND, TX to RX and RX to TX on the Arduino. TX means transmitter, and RX means receiver, so when wiring, the receiver of the one device goes to the other device’s transmitter. If you connected TX to TX, then there would be no way to receive the transmitted data. How the module itself works is by connecting to another device by emitting low-energy radio waves. The reason for adding this to the project was so I could see the flex sensor and accelerometer data without having to use a wired connection, making the project overall more useful.
At this point, I also had to add the power bank so the whole project could be powered without being connected to my computer. The power bank I used was the Anker PowerCore. It has more than enough capacity (5000 mAh) so it can power the device for 100 hours. This way I could connect my bluetooth to see if the data would print without a wired connection.
One of my challenges was that I wasn’t able to connect to my computer with the HC05. In the room, many people used the same bluetooth module, so the first obstacle was even connecting to the module that was mine. For half the day, I connected to all the modules, have none of them connect to my computer, then have to forget all of them and re-pair all of them again.
After pairing to one module, mine began to blink which indicated it was paired. After that I named the module “arjun HC05” in the device settings of my Mac. Now, the data would print on the serial monitor.
Figure 11; Components 101, HC-05 - Bluetooth Module - This image shows where the wires go on the HC05
After I attached the bluetooth module, all my components were attached and working. This meant I could solder everything so it was permanently connected. I got a new proto board, and began adding the components and soldering it from underneath it. The proto-board helped reduce the overall size of the project, making it more functional. Aside from a few minor mistakes, I got all the wires and components soldered onto the proto board, and now I just needed to test if everything still worked. The type of wire I chose to use for this was solid-core wire, and I made this choice because it would be easier to solder onto the proto board, and the higher degree of flexibility stranded-core wire offered was not required. One thing I learned to do while wiring was labeling my wire. This would save a lot of time in the future over confusion over which wire goes where.
When soldering, I accidentally put a wire connected to the piezo buzzer that was supposed to be connected to digital port 2 to the 5v area. This caused the buzzer to constantly be on at a really high pitch whenever it was connected to power. However, this was a simple fix. I simply had to melt the solder that was on that wire and remove it with the solder sucker, and put it into the right port. Then, everything worked fine.
After this, I attached everything to the knee sleeve. This part was simple, but tedious. I learned how to sew, and then I attached the parts one by one. First, I attached the proto board with all the wires on it, and I sewed the arduino next to it. After those two, I sewed the bluetooth module and accelerometer in place so they would not move around anymore.
Figure 12; The circled holes are where I sewed the arduino down
Then, the problem of how I would attach the flex sensor to the knee sleeve. The problem was that the knee sleeve stretched a lot when it was worn, so if I just put the flex sensor on the sleeve there was a risk of it breaking while the knee sleeve wanted to stretch. To combat this risk, I utilized a strip of neoprene fabric and put it over the sensor, sort of forming a tube for the sensor to fit in. This solved my issue because it let the flex sensor slide around as much as it wanted to, but it also held it down tight enough so I could measure its bend.
Next, I will finish Milestone 3, in which I will make it so that the Arduino will be able to make the buzzer buzz when the accelerometer detects bad squat form. For example, if your knees bend inward, the accelerometer could read that position and tell the Arduino to make the buzzer buzz. I am looking forward to this because when I had a leg injury, something that told me when my knee was bent inward would have been very helpful.
First Milestone
My first milestone was to detect position using a flex sensor and accelerometer. My first step was to create a circuit with a flex sensor and two resistors. First, I looked at a schematic that called for a 47k resistor, and a 50k resistor was the closest round number to 47k. As there were no 50k resistors, I learned about resistors wired in parallel to fix this issue. Since the current has more ways to flow through the circuit, there is less resistance overall. Due to this, I ended up putting two 100k resistors in parallel to each other to fix this, because when you put the two resistors in the parallel resistor formula (1/Rt = 1/R1 + 1/R2), the total resistance of the two ends up being 50k.
After resolving my resistor issue, I had to learn how flex sensors work. I learned that the flex sensor has ink that has conductive particles in it, and the more the sensor bends the more resistance is measured across it.
Figure 13; Spark Fun, Flex Sensor Hookup Guide - This graphic describes how a flex sensor has more resistance when it is bent.
The flex sensor is essentially a variable resistor. The problem is that an Arduino reads voltage. We can fix that by putting the flex sensor in a voltage divider circuit,then use the resistance that the flex sensor gives, use Ohm’s law and find the voltage of it, which is something the Arduino can actually read. For example, if we take the formula Vout = Vin × ( R2 / ( R1 + R2 ) ), and say the flex sensor is R2, if the resistance of it increases so does the Vout. Therefore, if the flex sensor bends more and the resistance increases, so does the voltage out which the arduino reads.
<p>Figure 14; Voltage Dividers: Operations and Functions - This is a voltage divider circuit. For my project, Z2 would be the Flex sensor and Z1 would be the parallel resistors I talked about earlier.</p>
This can be interpreted into the degrees the sensor is bending with some code. In the code, the flex sensor gives a value of 0 - 1023, then it is normalized. I calibrated the resistance for 0 degrees and 90 degrees, with STRAIGHT_RESISTANCE (0 degrees) being 13304.4 ohms and BEND_RESISTANCE (90 degrees) being 31319.56 using the map() function in the Arduino IDE. The function extrapolates the degree value to a different bend. Also, the flex sensor also can only be plugged into analog instead of digital because it has multiple values. When the sensor bends past 110 degrees, the buzzer goes off, which is the most your knees should bend when squatting.
Next, I added the accelerometer. I found a way to display the position of the accelerometer on the serial monitor of the Arduino IDE using the Serial.print()function. After some research, I found the code and put that into the Arduino sketch with the flex sensor code. Next, I wired the accelerometer to the Arduino.
Figure 15; GlobalSpec, Specifying an Accelerometer: Function and Applications - This is how a accelerometer works.
Some challenges I had were that I had to learn about parallel resistors to solve my resistor issue. This concept took me two days to grasp, but once I learned it it made my understanding of the circuit much better. I also had to learn how to get data from an accelerometer. I had no idea how to code this, but I was able to find some code online which made adding to my code much easier. Up next is my second milestone. I plan on attaching the bluetooth module, so I can track the data from the accelerometer and flex sensor much easier.
Schematics
Figure 16; Milestone 1 Schematic -
Figure 17; Milestone 2 Schematic (Breadboard is supposed to be proto board, simply solder components onto proto board how breadboard is wired) -
Figure 18; Milestone 3 Schematic (Breadboard is supposed to be proto board, simply solder components onto proto board how breadboard is wired) -
Code
// Basic demo for accelerometer/gyro readings from Adafruit LSM6DS3TR-C
#include <Adafruit_LSM6DS3TRC.h>
// For SPI mode, we need a CS pin
#define LSM_CS 10
// For software-SPI mode we need SCK/MOSI/MISO pins
#define LSM_SCK 13
#define LSM_MISO 12
#define LSM_MOSI 11
Adafruit_LSM6DS3TRC lsm6ds3trc;
const int FLEX_PIN = A0; // Pin connected to voltage divider output
const int buzzerPin = 2;
// Measure the voltage at 5V and the actual resistance of your
// 47k resistor, and enter them below:
const float VCC = 4.98; // Measured voltage of Ardunio 5V line
const float R_DIV = 50000.0; // Measured resistance of 3.3k resistor
// Upload the code, then try to adjust these values to more
// accurately calculate bend degree.
const float STRAIGHT_RESISTANCE = 10604.27; // resistance when straight
const float BEND_RESISTANCE = 13875.84; // resistance at 90 deg
const float ACCEL_THRESHOLD = 3.8; // Threshold for accelerometer (in m/s^2)
const int NUM_SAMPLES = 6; // Number of samples for moving average
float accelYBuffer[NUM_SAMPLES];
int sampleIndex = 0;
int beginTime = 0;
int TimeTook = 0;
void setup(void) {
Serial.begin(9600);
pinMode(FLEX_PIN, INPUT);
pinMode(buzzerPin, OUTPUT);
Serial.begin(9600);
while (!Serial)
delay(10); // will pause Zero, Leonardo, etc until serial console opens
Serial.println("Adafruit LSM6DS3TR-C test!");
if (!lsm6ds3trc.begin_I2C()) {
// if (!lsm6ds3trc.begin_SPI(LSM_CS)) {
// if (!lsm6ds3trc.begin_SPI(LSM_CS, LSM_SCK, LSM_MISO, LSM_MOSI)) {
Serial.println("Failed to find LSM6DS3TR-C chip");
while (1) {
delay(10);
}
}
Serial.println("LSM6DS3TR-C Found!");
// lsm6ds3trc.setAccelRange(LSM6DS_ACCEL_RANGE_2_G);
Serial.print("Accelerometer range set to: ");
switch (lsm6ds3trc.getAccelRange()) {
case LSM6DS_ACCEL_RANGE_2_G:
Serial.println("+-2G");
break;
case LSM6DS_ACCEL_RANGE_4_G:
Serial.println("+-4G");
break;
case LSM6DS_ACCEL_RANGE_8_G:
Serial.println("+-8G");
break;
case LSM6DS_ACCEL_RANGE_16_G:
Serial.println("+-16G");
break;
}
// lsm6ds3trc.setGyroRange(LSM6DS_GYRO_RANGE_250_DPS);
Serial.print("Gyro range set to: ");
switch (lsm6ds3trc.getGyroRange()) {
case LSM6DS_GYRO_RANGE_125_DPS:
Serial.println("125 degrees/s");
break;
case LSM6DS_GYRO_RANGE_250_DPS:
Serial.println("250 degrees/s");
break;
case LSM6DS_GYRO_RANGE_500_DPS:
Serial.println("500 degrees/s");
break;
case LSM6DS_GYRO_RANGE_1000_DPS:
Serial.println("1000 degrees/s");
break;
case LSM6DS_GYRO_RANGE_2000_DPS:
Serial.println("2000 degrees/s");
break;
case ISM330DHCX_GYRO_RANGE_4000_DPS:
break; // unsupported range for the DS33
}
// lsm6ds3trc.setAccelDataRate(LSM6DS_RATE_12_5_HZ);
Serial.print("Accelerometer data rate set to: ");
switch (lsm6ds3trc.getAccelDataRate()) {
case LSM6DS_RATE_SHUTDOWN:
Serial.println("0 Hz");
break;
case LSM6DS_RATE_12_5_HZ:
Serial.println("12.5 Hz");
break;
case LSM6DS_RATE_26_HZ:
Serial.println("26 Hz");
break;
case LSM6DS_RATE_52_HZ:
Serial.println("52 Hz");
break;
case LSM6DS_RATE_104_HZ:
Serial.println("104 Hz");
break;
case LSM6DS_RATE_208_HZ:
Serial.println("208 Hz");
break;
case LSM6DS_RATE_416_HZ:
Serial.println("416 Hz");
break;
case LSM6DS_RATE_833_HZ:
Serial.println("833 Hz");
break;
case LSM6DS_RATE_1_66K_HZ:
Serial.println("1.66 KHz");
break;
case LSM6DS_RATE_3_33K_HZ:
Serial.println("3.33 KHz");
break;
case LSM6DS_RATE_6_66K_HZ:
Serial.println("6.66 KHz");
break;
}
// lsm6ds3trc.setGyroDataRate(LSM6DS_RATE_12_5_HZ);
Serial.print("Gyro data rate set to: ");
switch (lsm6ds3trc.getGyroDataRate()) {
case LSM6DS_RATE_SHUTDOWN:
Serial.println("0 Hz");
break;
case LSM6DS_RATE_12_5_HZ:
Serial.println("12.5 Hz");
break;
case LSM6DS_RATE_26_HZ:
Serial.println("26 Hz");
break;
case LSM6DS_RATE_52_HZ:
Serial.println("52 Hz");
break;
case LSM6DS_RATE_104_HZ:
Serial.println("104 Hz");
break;
case LSM6DS_RATE_208_HZ:
Serial.println("208 Hz");
break;
case LSM6DS_RATE_416_HZ:
Serial.println("416 Hz");
break;
case LSM6DS_RATE_833_HZ:
Serial.println("833 Hz");
break;
case LSM6DS_RATE_1_66K_HZ:
Serial.println("1.66 KHz");
break;
case LSM6DS_RATE_3_33K_HZ:
Serial.println("3.33 KHz");
break;
case LSM6DS_RATE_6_66K_HZ:
Serial.println("6.66 KHz");
break;
}
lsm6ds3trc.configInt1(false, false, true); // accelerometer DRDY on INT1
lsm6ds3trc.configInt2(false, true, false); // gyro DRDY on INT2
for (int i = 0; i < NUM_SAMPLES; i++) {
accelYBuffer[i] = 0;
}
}
void loop() {
beginTime = millis(); //used for finding how long code takes to run
// Read the ADC, and calculate voltage and resistance from it
int flexADC = analogRead(FLEX_PIN);
float flexV = flexADC * VCC / 1023.0;
float flexR = R_DIV * (VCC / flexV - 1.0);
Serial.println("Resistance: " + String(flexR) + " ohms");
// Use the calculated resistance to estimate the sensor's
// bend angle:
float angle = map(flexR, STRAIGHT_RESISTANCE, BEND_RESISTANCE,
0, 90.0);
Serial.println("Bend: " + String(angle) + " degrees");
Serial.println();
//delay(500);
if (angle >= 110) {
tone(buzzerPin,50);
} else {
noTone(buzzerPin);
}
// Get a new normalized sensor event
sensors_event_t accel;
sensors_event_t gyro;
sensors_event_t temp;
lsm6ds3trc.getEvent(&accel, &gyro, &temp);
/* Display the results (acceleration is measured in m/s^2) */
Serial.print("\t\tAccel X: ");
Serial.print(accel.acceleration.x);
Serial.print(" \tY: ");
Serial.print(accel.acceleration.y);
Serial.print(" \tZ: ");
Serial.print(accel.acceleration.z);
Serial.println(" m/s^2 ");
// Add new reading to buffer and update sample index
accelYBuffer[sampleIndex] = accel.acceleration.y;
sampleIndex = (sampleIndex + 1) % NUM_SAMPLES;
// Calculate moving average of Y-axis accelerometer data
float avgAccelY = 0;
for (int i = 0; i < NUM_SAMPLES; i++) {
avgAccelY += accelYBuffer[i];
}
avgAccelY /= NUM_SAMPLES;
Serial.print(avgAccelY);
Serial.print(",");
// Check accelerometer threshold on averaged Y-axis data
if (avgAccelY <= -ACCEL_THRESHOLD) {
tone(buzzerPin, 150);
} else {
noTone(buzzerPin);
}
TimeTook = millis()-beginTime;
Serial.println(TimeTook);
delay(150-TimeTook);
}
// // serial plotter friendly format
// Serial.print(temp.temperature);
// Serial.print(",");
// Serial.print(accel.acceleration.x);
// Serial.print(","); Serial.print(accel.acceleration.y);
// Serial.print(","); Serial.print(accel.acceleration.z);
// Serial.print(",");
// Serial.print(gyro.gyro.x);
// Serial.print(","); Serial.print(gyro.gyro.y);
// Serial.print(","); Serial.print(gyro.gyro.z);
// Serial.println();
// delayMicroseconds(10000);
}
Bill of Materials
Here’s where you’ll list the parts in your project. To add more rows, just copy and paste the example rows below. Don’t forget to place the link of where to buy each component inside the quotation marks in the corresponding row after href =. Follow the guide here to learn how to customize this to your project needs.
Part | Note | Price | Link |
---|---|---|---|
Arduino Uno R3 | Microcontoller | $13 | Link |
BodyProx Knee Sleeve | Keeps All Components on Knee | $15 | Link |
Adafruit Long Flex sensor | Measures Bend of Knee | $18 | Link |
Adafruit LSM6DS3TR-C + LIS3MDL - Precision 9 DoF IMU - STEMMA QT / Qwiic | Accelerometer/Gyroscope | $20 | Link |
Piezo Buzzer | Alerts User of Incorrect Form | $6 | Link |
100k Resistors | Increases Resistance in Circut | $7 | Link |
DSD Tech HC-05 Bluetooth Module | Makes Monitor Able to Connect via Bluetooth | $10 | Link |
Assorted Single-Core Wires | Connections between Components | $15 | Link |
Proto Board | What Hold all the Parts | $10 | Link |
Other Resources/Examples
- Flex Sensor Hookup Guide
- MPU6050 Sensor Arduino Tutorial
- Specifying an Accelerometer: Function and Applications
- HC-05 - Bluetooth Module
- Serial Communication
- Elegoo Uno R3
Starter Project
My starter project is a microcontroller-based Arduino project. It buzzes when I press a button and an LED goes off when it detects motion.
There are 5 main components in this project. The parts consist of the Arduino itself, a button, a piezo buzzer, a green LED and a PIR motion sensor. The first input and output is the button and the piezo buzzer. The piezo buzzer works by applying voltage to a piezoelectric ceramic material. The voltage causes the material to deform and vibrate, making sound waves.
Figure 1 ; Photo from Arduino Sensor Kit - The image shows how the buzzer vibrates to produce a tone
The button makes the piezo buzzer buzz at a tone of about 50 hz by closing the circuit and allowing the current to flow to the buzzer.
The second input and output are the PIR, or Passive Infrared motion sensor and the LED, or Light Emitting Diodes. A PIR sensor detects infrared radiation. It does this by sensing a heat source’s movements, which cause a pulse which the PIR sensor sends as a signal. When the sensor detects the heat source moving, the Arduino reads it and tells the LED to turn off. The Arduino can have code uploaded to it, and that tells the microcontroller what to do.
Figure 2 ; Photo from Adafruit, Lady Ada - The image shows how the signal is generated. The heat sources passes through the detecting area and the PIR sensor registers that.
I had a few major challenges, with the biggest one being the difficulty of uploading my code to the Arduino. The port for the Arduino would not show up on the Arduino software. Therefore I could not upload my fixed code. I tried many things to troubleshoot this issue. For example, I tried pressing the reset button on Arduino, removing and reinstalling the software, and even testing the cable and the USB-C adapter, but the issue ended up being more simple. After rewiring the board, I got it working again.
Next, I will be working on my main project, the Knee Rehabilitation Monitor. The starter project gave me a good understanding of wiring, coding, and breadboards, so I am looking forward to my main project with this knowledge. The reason I chose my main project is because it looked like a helpful device for people with frequent knee injuries, like athletes or the elderly, and I think making something like the knee rehab monitor will help me find and make other ways to help in the future.