SUMMER STEM-HEALTH CAMP
  • Home
  • 2025 RCC Camp
    • Day 1: Basic Coding >
      • Button Control
      • Multicolor LED
      • Fading multicolor led
      • Melody (sound)
    • Day 2: Servos and Potentiometers >
      • DC Motor
      • Ultrasound
      • Potentiometer and Motors
      • 2 servo control >
        • Analog Stick Control
      • PIR Motion Sensor
      • IR Light Proximity Sensor
    • Day 3 Making an ECG/EKG! >
      • ECG/EKG health lesson
      • OLED Screen Basics
      • Pictures to OLED
      • BPM on OLED
    • Day 4: Measuring Pulse >
      • Scrolling Screen Graph
      • How the body absorbs light
      • Screen Pictures
      • IR Temp Sensor And Screen
    • Day 5: Finishing up/Show >
      • IR Light Proximity Sensor
      • PIR Motion Sensor
      • CO2 Sensor
      • Ultrasound distance sensor
  • The Teachers
  • Our Partners
  • Archive
    • 2024 Health-STEM Coding Camp >
      • Home (2024)
      • The Teachers
      • Day 1: Basics and Lights
    • 2024 Coding/Robotics Camp >
      • Day 1: Basic Coding >
        • Saving your codes
        • Engineering design
      • Day 2 Servos >
        • 2 Servos, one potentiometer
        • Multicolor LED >
          • Fading multicolor led
    • Pictures from prior years
    • 2023 3D Design Camp >
      • Day 1: 2D design
      • Day 2: 3D design basics
      • Day 3: Constraints
    • 2023 Health-STEM Coding Camp >
      • PreAcademy prep
      • Day 1: Basics and Lights >
        • Multicolor LED
        • Button Control
      • Day 2: Ultrasound >
        • Ultrasound Health Lesson
        • Supplement Melody
        • Supplement: Servo >
          • Potentiometer and Motors
          • 2 servo control
      • Day 3: Measuring Pulse >
        • How the body absorbs light
        • OLED Screen Basics >
          • Scrolling Screen Graph
      • Day 4 Making an ECG/EKG! >
        • ECG Health Lesson
        • Pictures to OLED
        • BPM on OLED
      • Day 5: Finishing up/Show
    • 2021 STEM Camp (HS) >
      • The Teachers (2021)
      • PreAcademy prep
      • Day 1: Basics, Lights, and Temperature Sensor >
        • Day 1 Supplement: Measure Temperature
        • Day 1 Supplement: IR Temp Sensor
        • Day 1 Supplement: Identifying Resistors
        • Supplement: Controlling A Servo
      • Day 2: Measuring Pulse >
        • How the body absorbs light
        • IR Light Proximity Sensor
        • PIR Motion Sensor
      • Day 3 Supplement: OLED Screen Basics >
        • Display Screen Temperature
        • Scrolling Screen Graph
      • Day 4: Finishing up/Show
    • 2021 STEM Camp (MS) >
      • PreAcademy prep
      • Day 1: Basics, Lights, and Temperature Sensor >
        • Day 1 Supplement: Identifying Resistors
        • Day 1 Supplement: Measure Temperature
        • Day 1 Supplement: IR Light Proximity Sensor
      • Day 2: Ultrasound >
        • Day 2 Supplement: IR Temp Sensor
        • Day 2 Supplement: Controlling A Servo
      • Day 3: Measuring Pulse
    • 2020 STEM Camp
    • 2018 Lessons
    • 2017 Camp
  • Contact Us!

AHEC Health-STEM Camp
​June 10 to 14th, 2024

2024 Health-STEM Camp: 

The half-day high school AHEC Health-STEM summer camp at RCC Warsaw introduces students to coding basics, Arduino, and healthcare technology. Students will build simplified versions of healthcare sensors and then work with RCC staff in the lab to learn how the real devices work!

Heath and Coding: June 10 to 14th  |
   9:00 to 12:00
Lessons:
  • Day 1: June 10 Basic Coding and Controlling Lights
    • Button Controlling Lights
    • The body's electrical signals health science lesson
  • Day 2: June 11: Ultrasound Coding Lesson
    • Ultrasound Healthcare Lesson 
  • Day 3: June 12: Pulse Oximeter
    • ​Measuring Light Signals Coding Lesson
    • Pulse Ox Coding Lesson
    • CO2 Sensor Coding Lesson
      • Build your CO2 mask
    • Pulse Ox Health Sciences Lesson
  • Day 4: June 13: Make an ECG 
    • ECG Wiring and Coding Lesson
    • OLED Screen display lesson
    • Helicopter medivac visit and lesson
    • ECG Nursing Lab Health Sciences Lesson
  • Day 5: June 14: Reach/Differentiation Day, Presentations
    • ​Use your body’s electrical signals to control lights
    • Combining the ECG and OLED cod
    • Parent/Sponsors student showcase
​
Picture

Introducing Arduino IDE

First, we will need to open the software, which is called Arduino IDE (integrated development environment). If it is not already open, go ahead and open it. It should look like the picture below if it is open.
Picture

Before coding, let's get familiar with the IDE. Here is some vocabulary and where to find the different parts. 
We will show you: 
  • The Global area (where variables are declared)
  • The setup () function
  • The loop () function 
  • The Serial Monitor and Serial Plotter
  • How to save the sketch to desktop 
  • How to verify code
  • How to upload (aka send) code to the Arduino
  • Where error messages display
Picture
Picture

 Lesson 1: Learn How to Code!

We will start with writing simple code, saving, and sending it to the Arduino. ​Let's start by getting the board's orange light to blink like this. 

Here's code to blink the Arduino

Let's Write our first code. 

Step 1: Type up this code. Capital letters matter. 
Picture

Checking your code. 

Step 2: Push the check box at the top left of the page. This verifies (aka checks) if the code should work.
It "compiles" the code. That means it turns it from human readable to computer readable language.
Picture

See if you get an error message?

Step 3: Check to see if an orange error message appears in the box at the bottom of the page.
​An example is on the right
Picture

If you got an error message, check the following things.
1) Are all the colored parts in this picture here colored in your code?
2) Check CaPiTaL letters. (they matter)
​3) Have you forgotten a ;
4) You may have forgotten a ( or )
5) Are there curly brackets, {   } 
                             
​If you get no error (the bottom box is not orange), then you can move on.

Still having issues? Let your teacher know!​
Picture

If you are having issues, read this. 

You may not be used CaPiTal lEttErs maTterING! Things change color as you type them correctly. The words like OUTPUT, HIGH, setup, and LOW will not change colors if you type them wrong. 

Another thing that you may not have seen before is an under-script, it looks like this _. To type _ you have to hold shift and - at the same time. The minus is beside the 0 (zero). 
​

Another new thing is every line of code ends in a ; semicolon. That button is beside the L.

You also may not have seen a curly bracket {   } before. That can be found next to the P key. To make a {, hold Shift and [ . To make a } hold shift and ] . 

Sending the code to the Arduino

Step 4. Upload your code to the board 
     a) Plug the blue USB cord into your Arduino and computer. 

     b) Select the right arrow button (next to the check mark in the top left corner) to send your code to the board. 
Picture
Picture

What is your Arduino doing? Is the code working? 
Below explains what each line of code is doing. 

Picture

The // double dashes are just comments. You do not need to type them. The Arduino does not do anything with them. They they help people know what each line of code is supposed to do. 

Remember, this video shows what the Arduino should be doing.

Did you get an error? (Is it working right?) 

You may get a "Problem uploading to board" or something similar.
If you do, it is because your Arduino does not know where the Arduino is plugged in. Or, your USB cord may not be plugged all the way in. 
​
 To fix this, click the select board drop-down and select your Arduino. 
Picture
Step 4) If you fixed the port issue if needed, push the arrow button beside the check box at the top again.

Give the board a second to upload, it should be blinking quickly, and then run your code. 
​Let your teacher know you need help. ​

Save

Now that you have made your first successful code, you should save it.
Name it something memorable so you can always find it again later. 

Your teacher will show you how, or you can watch this video.


After Saving, try changing the code

Play around with the code's delay values. Right now it is 1000. Try changing it. What does changing it do? Re-upload to the board after you try it.

Save your new code using a different name. (maybe: "MultiBlink")

Adding more lines to add blinking complexity. 

If you have time, try something creative like adding more HIGH and LOW lines into the loop code to make cool patterns. This can be done like in the example below.

Save your file, upload to board, and review 

Plug the Arduino board into one of your computer's USB ports. 

After it is plugged in, upload the code to the board. Click the right arrow beside the check mark at the top of the Arduino program. See the  picture below for what that looks like. 
Picture
You just made your first Arduino program! Congratulations.

Lesson 2:
Controlling "off-board" LEDs


Now we are going to figure out how to light LEDs from the Arduino board. You will need: Wires, a 220 Ohm resistor, and a red LED.
Picture

Warning: USE A RESISTOR OR THE LIGHT MAY BREAK

It is important to know LEDs only let current flow through it one way.
​If your light does not turn on, try flipping how your LED is connected. It may just be in backwards. 
Picture
LEDs only work when the longer end connects to positive pins on the board. The + pins on the board are any of the numbered pins, the 3V, or the 5V. 
Picture

How to find the 220 Ohm resistor? 

Your kit may or may not have the resistor values written on your strips. If it does not, you will have to find the 220 Ohm resistor using the color combinations on the resistor. To learn how to do that, go to this lesson and your teacher will help you learn how to do this. 
Click Here to Learn How to Identify Resistors Lesson

<--Use this button to learn how


Picture
​The shorter end connects to negative pins (GND/ground). ​​Remember that red is positive and black is negative. Use those color wires to help. 
Picture

Watch this video if you need help for how to do it. 


Lesosn 3: Introducing a Breadboard:
It Connects Many Parts Together 

Breadboards are for when you want many things to work at the same time. 

Yours may be longer than the one in this picture, but they all work the same. 


How does it work?
Picture
Picture
It has different rows and columns all connected together under the holes.

​This picture shows which parts are connected. You may have a smaller board than this, but this picture still shows the basics. 
Picture
Picture

Watch this for more about how breadboards work

Now, let's use this board to connect a bunch of lights! 

Lesson 4:
Series and Parallel Circuits (LEDs)


Now that you got one light to work on the board, let's try to get lights to work off of the Arduino board. See if you can get several lights to turn on at once. Try hooking up your lights in these three different ways. How are each different. Is the brightness any different? 

This activity does not need any code. It plugs directly into the 5V (aka +) and the Ground lines (GND aka -). Plugging those wires in is just like using a battery. 

Remember: plug in your Arduino with the USB cord!

Single LED

Picture

Series LEDs

Picture

Parallel LEDs

Picture
LEDs are Light Emitting Diodes. Light Emitting  means they make light. A diode is something that only lets electric current go one way. That means direction matters! The longer LED wire is the + side, and the shorter LED wire is the - side. 

Tip: use black wires to connect - parts (aka GND)
and red wires to connect + parts (aka 3.3 or 5V lines)
​See how that is done in the pictures above?  
Picture

You will need
  1) Red and black wires
  2) S
everal LED lights of the same color
  3) A resistor (this picture has what they look like)
Picture
Connect your lights to the breadboard like the pictures above. See what changes between each type of setup (single, series, parallel). Can you figure out how to power all three setups off the same board? Once you get your lights to work in parallel, try to use different colors. What happens when you try to use all different colored lights? 

It is ok if you don't understand how all this works today. 
The more we practice, the more you will get! 


Ask your teacher if you have any questions or need help. 
Picture

Lesson 5: Defining Variables at the start of code

Here is the example multi-blink code from earlier. See how we have to keep typing LED_BUILTIN over and over? We can avoid that by making what is called a "variable". Variables are easily able to be adapted/changed. If you have taken algebra, think solving for x, where x is the variable! 

What if we wanted to change which light to turn on? We would then have to then retype all of the LED_BUILTIN parts, gross! If we make a variable for the light at the start of our code? Then we will only have to change the pin we want to light up in just one spot! 
Picture
See this small change we added to the beginning of our code, line 1? 
This is the variable we are defining. 

Const means constant. That means we are telling the computer that this variable will not be changing when the code runs. 

int means integer. An integer means whole numbers. Integers are numbers like 1, 5, 22, etc. LED_BUILTIN is actually connected to Arduino pin 13, so we could have just typed in 13 there if we wanted. 


Picture

This video explains how to use variables


Changing the variable changes the pin to light up!

Now that we have made that variable, we can control other lights too! 
We can control lights connected to any Arduino pin using our blink code now. I can do that by changing the ledPin variable. Your teacher will now show you what that means. You can control your off-board LEDs using your blink code now : ) 

This video shows some of what you can do! 


Lesson 6: Analog Write Blink off-board LED 

Look on the rail of your Arduino. Some of the digital pin row numbers have a ~ symbol. The ~ means PWM (Pulse Width Modulation). Modulation means it can modulate up and down from various values. The digitalWrite we used before just uses on and off. If you move your wiring to use one of these ~ pins, like ~3, we can make it blink with different brightness.
Picture
Picture
Give this a try. Send it to your board and see if your light blinks at different brightnesses. 
Picture

Materials needed for today's activity. 

Picture
Picture
Picture
Picture
Picture

Trying out the Servo 

Step 1) Wire up your servo like the picture. 
  • The dark wire goes to GND
  • The red wire goes to 5V
  • The signal wire wire goes to pin 9. 
(Note, the last wire could be several different colors, it's yellow in the picture) 

You could put the servo's  last cord in  any pin, just make sure you change that pin number in myservo.attach(#),  where # is what you plugged in. In the example picture, it is plugged into 9. 
Picture
You will need extra wires to plug the servo into the Arduino. This is what that looks like. 

Try to match colors like black to black and red to red.
Picture
Step 2) Type in the code below.     
* // are just comments. You do not need to type the // or what comes after them. They are just there to tell you what that line of code does.
 
Picture
Tip: The # symbol is made by pushing shift and 3 at the same time

The  <  >  symbols are next to the m key on your keyboard.
(shift and the , key or hold shift and the . key)


Step 3) Validate the code using the check box button the upper left.

Step 4) Did you get an error? If so go through the checkpoints from yesterday. ​If you get no error, then you can move on.
  • Check CaPiTaL letters
  • You may have forgotten a ;
  • You may have forgotten a parenthesis ( or )
  • Did you type the curly brackets?  {   }    
                         
Step 5) Plug in your board. Upload the code using the right arrow symbol (top left) 
      *remember that "problem uploading to board" means you have to change your port. To do that go to: tools, port, and select Arduino


Step 6) Is it working? If so, that's cool! Save your work! 
       *If it is not working, a common  thing is that your wires have some glue stuck on the metal ends. Use your finger nails             to rub any glue off of the wires you are using. 

Once you get it to work, feel free to play with some of the numbers on the code and
re-upload it to the board to see how those numbers effected the servo.  

Use a screwdriver to screw a lever into your servo. 
Picture
Picture

How to control more than one Servo.

You will need to wire up your servo first. Do it like this picture

Notice the servos in this picture are in 10 and 11. You may need to change the code or the pins they are connected to in order to get your servos to work. 

Picture
How to add another servo to your code: 
1)   At the top of your code, just below “Servo myservo”, type in Servo myservo2; 
         *The “2” tells your code that you have a second servo now
2) In the void setup section, type the following below the first attach:
        myservo2.attach(10);        *this attaches the 2nd servo to pin 10 
3) In the void loop section, type the following below myservo:
        myservo2.write(pos);        *this tells the 2nd servo to move  to the position  

You can follow these steps again to add as many servos as you want later if you have time. 

Here is the code for what your 2 servo control code might look like. 
Picture

If you want your second servo to go to different positions than your first, you will need to declare a different number than pos and use that instead. Directions below
Notice in these lines of your servo code that the positions go from = 0 to 180 in steps of + and - 1.

Changing these numbers would make it move to a different position. Try it out and see what happens. 

180 means 180 degrees (1/2 a circle) 
Picture
Example: Try changing 180 to 90 instead. What does that do? 

WARNING: Servos usually do not go more than 180 degrees or 1/2 a circle. If you put in more than 180, you may break your servo. 

Controlling servos with Input 

​What if we want a person to be able to change where the servo goes with a physical input, we need to add something that is called an "input" (inputs you control). A potentiometer is good for this. 

Here is a picture of one. 

Turning it changes its output value. We can tell the computer how to use this data. 

Picture
Just to clarify, our potentimeter is fatter than the wiring picture shows. Ours skips a hole between the pins. 
Here are the steps to use the knob
Step 1) Wire up your Arduino like this picture using the breadboard.

Note that there are 8 wires. 
  • 3 for the servo
  • 3 for the potentiometer
  • 2 going from the 5 V and GND to the board

Step 2) Plug in your Arduino with the Blue USB Cord

Step 3) Type in this code below
Picture
Picture
Step 4) Did you get an error? If so go through these checkpoints:
     1) Are all the colored parts in this picture colored in your code?
     2) Check CaPiTaL letters.
​     3) You may have forgotten a ;
     4) You may have forgotten a parenthesis ( or )
     5) Did you type the curly brackets?  {   }    

                             
​     If you get no error, then you can move on.


Step 5) Upload the code using the right arrow symbol in the upper left. 

Step 6) Is it working? Move the knob back and forward to see if the knob moves the servo.
If so, that's cool. Make it do a little dance and save your work! 

After you get through today's main activity and show your teacher that you got your servo on a base, you can move to a supplemental activity. 

Picture

Did you do the basic servo lesson yet, if not, here is the basics.

Set up your wiring and code like the sweeping code from the last lesson. As a reminder, this is what that looks like. 

You can plug your servo's orange cord to any pin, just make sure to type that pin as myservo.attach(#)
Picture
Picture

Controlling where the servo goes! 

Now let's change the servo code to something you control. 

We need to add something that is called an "input", to tell it where to go. 

In comes the potentiometer. Turning it changes the resistance and we can tell the computer how to use this data. 

We will also be wiring many more things up soon, so we should make an easy to change variable to set what where servos are plugged into the board. 
Picture
The Code: Remember that the // and text after that are just comments. You don't have to type those. 
Picture

Upload to board and test it! 

Supplemental Day 2 Lesson​


Controlling 2 servos with one potentiometer

Someday you may want to wire up many of these servos to control a lot of things. We should learn how to change a code to add more of the same thing. Below is code similar to the end of the 3rd lesson from day 2 on controlling one servo with one potentiometer. ​
Picture
Now, below is the same code but just adding the lines needed to control a 2nd servo. Note what changes. Is there a trend for the changes? Try it out and see if you can get it to work.  
Picture


​

​

Remember that below is how to wire up two servos. The potentiometer wiring looks the same as before. 

Ultrasound distance alarm

Picture

Materials for this activity: 


Ultrasound Sensor
Picture
Jumper Wires
Picture
Arduino and USB Connector
Picture

These are for part 2

LEDs 
Picture
Buzzer
Picture
Breadboard
Picture

What is Ultrasound?

Several animals send out high-frequency sound that reflects off of other objects. A sound that is a higher pitch than humans can hear is called ultrasound. They then sense their own reflected sound when it comes back. The loudness and time it takes to come back depends on the distance to the object. 
Picture
Picture
Picture

Ultrasound sensor wiring and coding basics

Wire up your ultrasonic sensor like this picture. 

VCC is connected to the 5V Arduino pin 
Trig is connected to Arduino pin 3 
Echo is connected to Arduino pin 2 
Gnd is connected to an Arduino GND pin
Picture
Now that you have it wired, you are ready to type in the example code. 
Picture
Here is the code with descriptions of what each line does. 
Picture

Verify and upload the code to the board


Test it: Serial Monitor

After you upload it to board, see if it works. The text for how far away objects are from the ultrasound sensor is being sent to the serial monitor. To see that, you have to open the monitor by clicking its button. Here is where that button is and what the monitor looks like. 
Picture
Picture

Making the Arduino Light Up if you get to close

Put this right after the last code's Serial Prints. This makes the light turn on if distances are between 0 and 91 cm, otherwise the light is off. 

We also need to define the LED's location and to define that pin would as an output. Add that to the ultrasound code following this example. ​
We will now add a little bit to our code so that when you get closer than three feet to something, a light will turn on. Three feet is 91 centimeters, we need that number later. You can pick a different difference if you want. Every foot is about 30.5 cm. 

To do this, we have to add what is called a condition. This can be done with an "if/else" statement. 

Here is an example of an if/else we can add. ​
Picture
Picture

Example Wiring

The only thing we are adding is the LED to GND and pin 13. Depending on the color, you will need to add a resistor. The 220 or 330 Ohm resistor works well for Red or Yellow. Ask your teacher about how to do this if you need to. 
Picture

Full Example Code

Picture

Verify and Upload Code to the Board, Does it Work?  

Is the code working, what is happening? Ask your teacher for help if you need it. 

Trying the Buzzer

If you got your light to shine when you got too close to the sensor, then you can do the same thing with the buzzer instead.

Replace the light with a buzzer and see if it now buzzes when you get too close! 

After that works, use your breadboard by connecting a wire to GND to - and pin 13 to the + rail. Then you can plug as many lights and buzzers in parallel to the breadboard rail. See if you can control multiple things at once with the ultrasound sensor. Remember to use resistors for the lights. 
Picture

This lesson was inspired by a Dr.Duino lesson: ​ www.drduino.com

hackaday.com/2020/04/09/ultrasonic-sensor-helps-you-enforce-social-distancing/
Picture
Picture

​Materials needed for today's activity. 

Spare Wires
Picture
Arduino and USB Cord
Picture
3 Lead ECG
Picture

Note: Not for diagnostic purposes

The Arduino heart monitor and the IDE Serial Monitor for this lesson are purely for educational purposes and should not be used for any diagnostic purpose.  If  you have any medical concerns that arise as a result of this education experience, contact your health care provider for advice.   

How to hook up your Heart Monitor?

We'll show you how to place the electrodes. If you are not taking this class in person, watch the videos in the health science lesson for today. 


​Here is a picture to help you see where to place the pads. 
Picture

Seeing your Heart Rhythm! 

Now that you are all plugged in, you should be able to see your heart rhythm. ​The Arduino Serial Plotter should look something like below, this is Mr. Dorsey's heart. 
Picture
Here is Mr. Dorsey explaining how he got his heart rhythm.
​Tip (stay still!)

Control Electronics with your Heart

We will now learn some things we can do with our heart signals! 
Picture
Send your code to your Arduino and open the Serial Plotter. See if your Arduino's builtin LED is lighting up at the same time your heart beats. Below is how to adjust your code to work perfectly for you.

Finding your threshold value

You have always been told that everybody is different. Well, so is everyone's heart! The threshold value I used for my code above will be different  than the one you need. 

See how my highest hump is at about 390 and my 2nd highest hump is at around 360. You have to pick a threshold number between those two. I chose 370. 
Picture
Change your code's threshold number to work with your heart's numbers and resend your code to your board. 
Picture
Remember to save your code!

Does the onboard LED light when your heart beats? 

​Your onboard LED should be blinking once every time your heart beats.

If you need help, watch this video. 

Controlling an off board light with your heart. 

Plug in your resistor attached to your LED like below to control your light using your heart.  That is the 220 Ohm resistor and a red LED.
Picture

Let's make a light show.

Remember the series and parallel lesson using the bread board? You can actually put a bunch of lights on your breadboard that will light up whenever your heart beats! For the +- rail, hook the black wire to the GND and the + red wire to pin 13.  
Picture
After you get your lights to work with your heart, feel free to share a video with your teacher by emailing it to them!

LET'S MAKE SOME NOISE! (Buzzer) 

Once you are able to get lights to work on your bread board, all you have to do is replace the lights with the buzzer in your kit and your buzzer should beep every time your heart beats. 
You will need the buzzer and a 100 Ohm resistor for this.

If your buzzer turns out too quiet, you can also try the 10 Ohm resistor.
Picture
Picture
Picture
Here is a video showing it working. ​This uses the same code as before. 


Disclaimer: The Pulse Sensor you make for this activity should not be used for diagnostic purposes. If at any point you are concerned about your heart rhythm, you should consult your physician.


Materials for this activity:


The Arduino and USB cord
Picture
Several Different LEDs
Picture
All the Resistor Strips
Picture

The Pulse Sensor​
Picture
Wires
Picture
Breadboard
Picture

Buzzer

Picture

What is the Pulse Oximeter Sensor? 

The pulse sensor is just a Red light, an IR light, and a photodetector. The sensor is measuring how much of the light is penetrating your finger. 
Picture
Picture
Picture

Measuring the Heart Beat

Here is a video that shows a similar sensor to what you will build. This way, you know what to expect. We will use a sensor to get a plot of our heartbeat. Specifically, the sensor measures the IR light going through/off your skin. As blood pumps, this value changes. 

Measuring Pulse

Pulse is one of the simplest and main resources healthcare professionals can use to know if something is wrong with you. This activity will help you learn basic Arduino wiring, how to read data from a sensor, and how to get information to display on your computer monitor. ​
​
Before we write the code, we need to get the library that runs the SpO2 sensor. 
In Arduino IDE:
  1. Go to Sketch -> Include Library -> Manage Libraries
  2. Type in “max3010x” into the search box
  3. Install/Download the “Sparkfun MAX3010x Pulse and Proximity Sensor Library”
Picture
Now we are ready to wire and code the sensor. ​


How to Wire the MAX Pulse Sensor

The pulse sensor is just a Red light, an IR light, and a photodetector. 

Flip over your sensor and find the 4 prong labels (Vin, SDA, SCL, GND). You will also need 4 wires to connect the sensor to the Arduino. Use the picture here to help. 
Vin (volts in) to the 5V Arduino pin 
GND (ground) to the GND Arduino pin
​SDA to the Arduino A4 pin
SCL to the Arduino A5 pin​
Picture
Picture

Coding for the Pulse Sensor

Picture

Here is Mr. Dorsey explaining the sensor and code


Verify and Upload the Code to the Arduino 

After you upload the code to the board successfully, open up your serial monitor to see if it is giving your readings. 

Seeing your pulse data. Serial Plotter

Now, let's learn how to see a graph of your pulse data! Go to Tools and select Serial Plotter.

You will have to wait about 10 seconds for the graph to zoom in on the data. 

Picture
Here is a screenshot of Mr. Dorsey's data from the serial plotter.
​
Here are some tips to get a good reading. 
1) Use your thumb, it is bigger and has more blood flow
2) Do not push down too hard on the sensor (that would restrict blood flow) 
Picture
Hopefully, you got the sensor to give a reading! If you didn't, ask for help.

For this graph, the reading is how much IR light it is getting reflected back into the sensor. The value increases as blood loses oxygen and decreases when it has more oxygen. Darker blood is less oxygenated blood. 


Light blinks when your heart beats

In this activity, we will turn on a light every time your heart beats. In order to do this, you need to set a "threshold value". That means a limit. The light is kept on whenever your sensor gets a reading below that point and the graph goes below that point. If it is outside that value, the light will be off. For my above graph, you can see that the graph goes between 104,100 and 103,500. It quickly drops down to the 103,500 value when my heart beats. Your value will be different, so you need to look at your graph to pick this number. 
Picture
Picture

Calculating BPM

We can use this sensor's data to calculate your heart's beats per minute (BPM). That code has a lot of math and uses arrays(matrices), so we are not going to have you type this one out yourself. Here is a link to that Arduino file. Open this file on your computer and compile it. Open your serial monitor and see if it works. 
heartrate_serial.ino
File Size: 2 kb
File Type: ino
Download File

If your sensor is powered correctly, you should see a little red light on it. If you do, put your thumb over the sensor and keep it there. After several seconds, it should level out your BMP reading. 
Picture

This lesson is inspired by
https://how2electronics.com/blood-oxygen-heart-rate-monitor-max30100-arduino/​
https://lastminuteengineers.com/max30102-pulse-oximeter-heart-rate-sensor-arduino-tutorial/​

Materials for this activity: 


Gas Sensor MQ135
Picture
Jumper Wires
Picture
Arduino and USB Connector
Picture

Breathing Barrier
Picture
22 kΩ Resistor
Picture
Picture
OLED
Picture
Breadboard
Picture

CO2 in the air 

The Earth’s Atmospheric CO2 level is increasing year over year. Monitoring CO2 in the atmosphere isn't the only important place to measure it. Monitoring it in a room or when breathing is also important in a healthcare setting. 
Picture

Wiring Diagram

For the first CO2 activity, we are only using the A0 signal pin. Let's wire it up. 
Picture
Picture
Picture

The Base Code

We will start simple and not calibrate it. We will just take its preprocessed output data and display it to the serial monitor. Type up and upload this code after you wire up your sensor to the board. After you upload it, open up the serial monitor. 
Picture
It should have outputs like this. 
Picture
​Did it work? If it did, save your code. 

Outputting Readings to OLED

Wire up the OLED with the gas sensor. Below is how to wire that if you forgot. Change the code to below and see if you can get the readings from the sensor to get sent to the OLED. 
Picture
The Wiring. 
1) GND to GND 
2) VCC to 5 V
3) SCL to pin A5
4) SDA to pin A4
Picture

This lesson is inspired by 
https://circuitdigest.com/microcontroller-projects/interfacing-mq135-gas-sensor-with-arduino-to-measure-co2-levels-in-ppm

and https://pslab.io/blog/measuring-co2-with-mq135/

https://www.hackster.io/sheekar/mq-135-sensor-co2-benzyne-with-arduino-sheekar-banerjee-ab6ccd​

​Students, fill out this form for proof of enrollment

https://www.surveymonkey.com/r/Preview/?sm=6OU11AF_2Bwd2xruqmFLhFx223v_2Bsbuq_2F_2F8JgxHLeNVvn5hkLXBhHME729nddoPgXV
Picture

Show and Tell

At 11:45 parents are invited to our classroom (175) for a showcase where students share the things they built. Mr. Dorsey will share other regional STEM opportunities your family can consider when your students get older. 

It's time to prep for the show! 

Check that all your electronics and code work for the main item you want to present. Once you get that working, try to set up some other things you were able to make.  Finalize what you want to show your teachers,  the other students, and parents. 

​Your spaces should be cleaned and ready to present by 11:30.

Go Beyond!

Differentiation day: Students get time with teachers to catch up on activities from earlier this week if they could not finish them. Students that are ahead can try our optional lessons or look through tutorial books and learn how to do more at their own pace.
Here are some of the built in examples the Arduino program comes with: 
https://www.arduino.cc/en/Tutorial/BuiltInExamples


Here is a book if you are interested in other activities that we did not learn this week. Your kit has many of the parts needed for these, but not all. There are many Amazon Prime Arduino stores where you can get other supplies. 

the_most_complete_starter_kit_for_uno_v1.0.17.1.13.pdf
File Size: 31153 kb
File Type: pdf
Download File

Your browser does not support viewing this document. Click here to download the document​.
Some lessons that you may want to try. 
Joystick to control a motor: https://toptechboy.com/arduino-tutorial-39-using-a-joystick-to-control-dc-motor-speed-and-direction/ 

Controlling a multicolor LED: 
​https://create.arduino.cc/projecthub/Raushancpr/control-rgb-led-with-joystick-68f601

The 2024 Teachers


Mr. Dorsey: RCC Summer STEM Camp Director

Picture
Mr. Greg Dorsey is the Physics teacher, student opportunities coordinator, robotics coach, and technology lead for the Chesapeake Bay Governor's School (CBGS). In Augest 2024, he will start as a physics instructor for Fairfax at Thomas Jefferson High School for Science and Technology. 

He is a Virginia Middle Peninsula native with a Masters in Teaching and a B.A. in Physics from the University of Virginia.  He taught for the RCC Summer STEM Camp seven years and this is his fifth year as camp director. 

Mr. Moore: King George Coding STEM Instructor

Picture
Mr. Rhett Moore is RCC's Network Administrator and holds a Masters in Computer Science with a concentration in Cybersecurity Management and Policy from the University of Maryland Global Campus. He has assisted with the RCC summer STEM camp for 6 years.
 
Mr. Moore has been working in Technology the last 12 years and can be found in his spare time working on DIY projects ranging from programming to 3D printing. He has just finished building his own fully functioning 3d printed electric guitar along with a miniature Raspberry PI server rack complete with video, Bluetooth speakers, and backup power supply.

Ms. Kate Bozeman: RCC Nursing Instructor

Picture
Kate, an RCC EMS and nursing programs alum, has 14 years of EMS and 4 years of nursing experience. She teaches full-time at RCC's nursing program and works as a paramedic with Richmond County Department of Emergency Services. Kate specializes in emergency and critical care nursing, blending her prehospital and bedside nursing experiences. She holds a bachelor's in nursing from Western Governor's University and is pursuing a master's in nursing education.

Ms. Whitney Harmon: Coding Teacher

Picture
Ms. Whitney is an Essex native and recent graduate from Virginia Commonwealth University in Biomedical Engineering. She has ample experience in Computer Animated Design (CAD) and in making robotic arms and ECG circuits through academic projects as a VCU Bio-Med Student. This is her second year teaching with the RCC Summer Camps. 

RCC STEM Camp Partners

Picture

Carl D. Perkins Grant Administrators:

Picture
Picture
Picture
Mr. Lomax manages the Carl D. Perkins Technical Education grant for RCC which sponsors the 7 to 9th grade STEM Summer Programs. 

​The grant is also overseen by Dr. Brooks, RCC's Academic Dean of Humanities, Art, Social Sciences, & CTE. 

RCC Education Foundation: 

Thank you for helping us purchase some of the camp electronics!  

Rappahannock Area Health Education Center 

RAHEC supports the high school Health-STEM camp in funding the supplies, instructors, and speakers.
Picture

Rappahannock AHEC Director: Stacie Wind

Picture
Ms. Wind is the founding Program Manager for Rappahannock AHEC which focuses on community outreach, recruitment, and training of future health professionals in the Northern Neck, Middle Peninsula, and Fredericksburg Area of Virginia.

Formerly, Ms. Wind was the Co-Director for the statewide care transitions program at Bay Aging. A Northern Neck native and an RCC Alumni, she graduated from James Madison University in Health Administration. 

RCC Dual Enrollment Advisor: Hutt Williams

Picture
Hutt assists each year with our RCC STEM Camp Marketing to our region's middle and high schools. 

He is the Dual Enrollment student advisor and is who you would talk to if you want to learn more about graduating from high school with your RCC Associates degree or other certification. Hutt also serves as the RCC recruiter. 
Proudly powered by Weebly
  • Home
  • 2025 RCC Camp
    • Day 1: Basic Coding >
      • Button Control
      • Multicolor LED
      • Fading multicolor led
      • Melody (sound)
    • Day 2: Servos and Potentiometers >
      • DC Motor
      • Ultrasound
      • Potentiometer and Motors
      • 2 servo control >
        • Analog Stick Control
      • PIR Motion Sensor
      • IR Light Proximity Sensor
    • Day 3 Making an ECG/EKG! >
      • ECG/EKG health lesson
      • OLED Screen Basics
      • Pictures to OLED
      • BPM on OLED
    • Day 4: Measuring Pulse >
      • Scrolling Screen Graph
      • How the body absorbs light
      • Screen Pictures
      • IR Temp Sensor And Screen
    • Day 5: Finishing up/Show >
      • IR Light Proximity Sensor
      • PIR Motion Sensor
      • CO2 Sensor
      • Ultrasound distance sensor
  • The Teachers
  • Our Partners
  • Archive
    • 2024 Health-STEM Coding Camp >
      • Home (2024)
      • The Teachers
      • Day 1: Basics and Lights
    • 2024 Coding/Robotics Camp >
      • Day 1: Basic Coding >
        • Saving your codes
        • Engineering design
      • Day 2 Servos >
        • 2 Servos, one potentiometer
        • Multicolor LED >
          • Fading multicolor led
    • Pictures from prior years
    • 2023 3D Design Camp >
      • Day 1: 2D design
      • Day 2: 3D design basics
      • Day 3: Constraints
    • 2023 Health-STEM Coding Camp >
      • PreAcademy prep
      • Day 1: Basics and Lights >
        • Multicolor LED
        • Button Control
      • Day 2: Ultrasound >
        • Ultrasound Health Lesson
        • Supplement Melody
        • Supplement: Servo >
          • Potentiometer and Motors
          • 2 servo control
      • Day 3: Measuring Pulse >
        • How the body absorbs light
        • OLED Screen Basics >
          • Scrolling Screen Graph
      • Day 4 Making an ECG/EKG! >
        • ECG Health Lesson
        • Pictures to OLED
        • BPM on OLED
      • Day 5: Finishing up/Show
    • 2021 STEM Camp (HS) >
      • The Teachers (2021)
      • PreAcademy prep
      • Day 1: Basics, Lights, and Temperature Sensor >
        • Day 1 Supplement: Measure Temperature
        • Day 1 Supplement: IR Temp Sensor
        • Day 1 Supplement: Identifying Resistors
        • Supplement: Controlling A Servo
      • Day 2: Measuring Pulse >
        • How the body absorbs light
        • IR Light Proximity Sensor
        • PIR Motion Sensor
      • Day 3 Supplement: OLED Screen Basics >
        • Display Screen Temperature
        • Scrolling Screen Graph
      • Day 4: Finishing up/Show
    • 2021 STEM Camp (MS) >
      • PreAcademy prep
      • Day 1: Basics, Lights, and Temperature Sensor >
        • Day 1 Supplement: Identifying Resistors
        • Day 1 Supplement: Measure Temperature
        • Day 1 Supplement: IR Light Proximity Sensor
      • Day 2: Ultrasound >
        • Day 2 Supplement: IR Temp Sensor
        • Day 2 Supplement: Controlling A Servo
      • Day 3: Measuring Pulse
    • 2020 STEM Camp
    • 2018 Lessons
    • 2017 Camp
  • Contact Us!