Here are the images the group might use . . . .
MHS Arduino
Wednesday, 16 November 2016
Twine Coding
To be able to enter images in your Twine code you need to have URL's of Images and enter the correct HTML code.
Friday, 12 February 2016
Arduino Heart Signal
This month students in the STEM course worked on building and testing a bio-medical device that will detect their heart signals.
The following is the circuit you will have to build.
Visit a student's post for more about the experimentation they did to make the arduino plot out their heart signal.
http://avatanstem.blogspot.com/2016/02/heart-rate-monitor-part-1.html
The following is the circuit you will have to build.
For the code you will have to load a filter library.
https://github.com/JonHub/Filters
Download the zip file and place it in your arduino libraries folder.
When in the arduino program go to the menu Sketch>Include Library>Add .ZIP Library
Here is the following code you need for your sensor to work.
Upload the program and open the plotter in the Tools menu. Try different fingers between the IR LED and IR Sensor to see what works best for you.
Here are some visuals that you might see that would represent your heart beat.
If you are not getting a consistent frequency you have noise and might be moving or talking too much. Also, check if your circuit is built correctly.
Visit a student's post for more about the experimentation they did to make the arduino plot out their heart signal.
http://avatanstem.blogspot.com/2016/02/heart-rate-monitor-part-1.html
Friday, 20 November 2015
Arduino Basics
Today the STEM class connected their arduino boards to the computer and programmed for the first time this school year.
Here are some of the basic programs we wrote today and ways the students then were asked to modify the programs.
Here were the basic instructions the students were given to get started.
Program #1
After you load this program go to the Tools menu and select Serial Monitor. You will see Hello World getting printed in the serial monitor.
Student's were then asked to make this program better by making it print "Hello World" on a separate line in the serial monitor.
They changed the line "Serial.print("Hello World");" to "Serial.println("Hello World");"
Students also added a delay in the program by adding a line after the print "delay(1000);"
This made the program print out "Hello World" every second on a new line.
Program #2
Plug an LED into your arduino board. Put the long leg into port 13 and a short leg into GND.
This is the first time students were introduced to the digitalWrite command. Some student's projects were not blinking the LED on and off because they forgot to set up port 13 as an OUTPUT. Student's then were asked to modify the program to make the light blink faster and slower.
Program #3
In the third programs students setup a variable that is an integer. If they want to change the value of the variable they can do it once in the start of the program. Students were asked to add a line to this code to print the value of the variable blinkTime.
Program #4
In program #4 students are introduced to a math operator. Every time the program goes through the loop 20 is added to the value of the variable. Students were asked to change this math operator to make the LED blink faster and faster.
Program #5
In program #5 students are introduced to an if statement. Students were asked to change this program so that the LED blinked faster and faster. When it reached the value of 0 use an if loop to reset the LED to the original value.
Program #6
In Program #6 students make an LED fade. A digitalWrite will set the LED to HIGH or LOW, which is ON or OFF. A analogWrite will turn an LED on to a certain value. This is how you can dim the LED. This program does have an error. Port 13 does not work with the command analogWrite. Students change the number 13 to 11 and plugged the long leg of the LED into 11 and the short into GND.
Thursday, 15 October 2015
Shake Table
Today the STEM classes built K'NEX towers to test on the shake table. Later we will use accelerometer sensors to test the frequency and amplitude of the towers. Students will then calculate the pendulum they would need to add to the tower to balance out the frequency and amplitude of the tower.
Here are videos from the day.
Here are videos from the day.
Wednesday, 22 July 2015
Shake Flashlight: STEM summer 2015
This project doesn't use Arduino yet. We can use Arduino later to collect quantitative data about the voltage that is produced by shaking the light using analogRead. It takes some fancier programing and circuitry to make an Arduino measure amperage.
Today students created a device that generated electrical current.
Today students created a device that generated electrical current.
Students here are creating the coil.
After students create the coil they sanded off some of the insulation from each end of the wires and added an LED. Shaking a neodymium magnet in the PVC tube produced a current through the wire.
Here is a video of a final product.
This isn't a very efficient flashlight. Students will be asked this year how are ways they can make this flashlight better.
During this class session students were also shown a brief demonstration of how Arduino and Processing program to read the voltage produced from the shaking motion. I will post about the details that that later.
Traffic Light: STEM Summer 2015
This lesson started with a mini lecture of what were LEDs, resistors, and how breadboards worked.
(If you are teaching your students about the resistor color code. Follow this link to a great Resistor Color Code Game)
Students then built the traffic light circuit with the arduino below.
Students then wrote and uploaded a sample program. They played with the lines of code in the void loop to turn on and off all three lights.
Students then made the lights simulate a real traffic light. The following was their challenge.
- Make the yellow light flash on and off 5 times. (one second on one second off)
- Then the Green light goes on for 10 seconds.
- Next the Yellow light goes on for 3 seconds.
- Last the Red light is on for 7 seconds.
- The program then loops back to the blinking yellow light.
Last the students worked on modifying a program to simulate a walk button in the traffic light system. They used the following program to modify.
Students added their traffic light program into the else brackets and changed the line of code for if the button was pressed.
Students realized that to make the walk button to work you had to hold it down because of all the delays in their traffic light program. Additionally after you held down the button the traffic light went from red to yellow. Maybe the program should just stay red longer. Some students took out the yellow turning on when the button was pressed.
Keep following. There will be more about using the clock on the board to make a more realistic traffic light.
Subscribe to:
Posts (Atom)