In the Zoom chat, please introduce yourself:
Your name
Grade in school
School name and location
Computer programming experience? Which language(s)?
[not to worry -- this class is designed for never-ever programmers.]
What are you interested in learning in this Intro to Arduino class?
Please use your real name in your Zoom profile.
Avoid using a Zoom background as it often makes it hard to see your face and your project.
Please mute your audio if there is noise in your environment. But, if you are in a quiet space, it's OK to leave your mic on.
It's great to see each other's faces. It really helps us understand if you are understanding the course material or if you have a question. So, please keep your video on if you are able to.
We'll be sharing our projects with each other a lot, so please be ready to use the Zoom "Share" button.
It's best to share your entire display when using the Arduino IDE so others can see your program/sketch and the serial monitor/plotter windows.
Questions and comments are awesome!
To get the instructor's attention, you can raise your hand, use the Zoom "Reactions" button, or talk.
You can take a break whenever you need to. Just let the instructor know that you are stepping away.
Complete: Lesson 1: Blinking with the LED
Then, modify the Arduino sketch to do something different, such as:
blink at a different rate
changing the delays and adding more digitalWrite( ) commands to make your program blink a message in Morse code.
Example: SOS (Emergency) : short-short-short-long-long-long-short-short-short
You can use a for( ) loop to do something multiple times. Like this:
for (int i = 0; i < 5; i++)
{
digitalWrite(ledPin, HIGH);
delay(1000);
digitalWrite(ledPin, LOW);
delay(1000);
}
your ideas?
Then, modify the Arduino sketch to do something different, such as:
blink the LED 5 times when you press the button
blink the LED 2 times when you release the button
your ideas?
Then, modify the Arduino sketch to do something different, such as:
change the blinking pattern when you turn the rotary potentiometer
your ideas?
How's Intro to Arduino so far?
What's interesting? What's confusing? Is the pace too fast? too slow?
Complete: Lesson 4: Making the Buzzer go BEEP
What is this sketch doing? What do you think will happen if you change:
analogWrite(BuzzerPin, 128);
to
analogWrite(BuzzerPin, 64);
Was your guess correct?
Read about analogWrite() and PWM (Pulse Width Modulation)
Oscilloscope demo - show buzzer waveform, duty cycle, and frequency
Read about the tone() and noTone() functions in the Arduino Language Reference.
Run this example from the Arduino IDE:
File ... Examples ... Built-In Examples ... Digital ... TonePitchFollower
Change this statement to use the pin where the buzzer is connected on your board:
tone(9, thisPitch, 10);
tone(5, thisPitch, 10);
What else can you do with the buzzer? Try these:
Play music!
run this example:
File ... Examples ... Built-In Examples ... Digital ... toneMelody
Change these statements to use the pin (5) where the buzzer is connected on your board:
tone(8, melody[thisNote], noteDuration);
noTone(8);
#include "pitches.h"
enables you to play a musical note, such as middle C on a piano:
tone(5, NOTE_C4, 1);
My sketch: buzzer_freq_button.ino
Rotary potentiometer changes pitch and the button plays the sound. Uses code from the previous two lessons
Your ideas?
Complete: Lesson 5: Making an Light Induct LED (Read this as "Making a light-controlled LED.")
Codecraft sketch: Light Sensor LED.cdc
Use the Serial Monitor to watch sensorValue change as you put your hand over the light sensor. Is the LED turning on and off?
You may have to change this depending on the light level in your environment:
if (sensorValue < 200) {
Then, modify the Arduino sketch to do something different, such as:
make the LED blink when you put your hand over the Light detector module.
make the buzzer beep when light is detected
your ideas?
Complete: Lesson 6: Sound Sensitive LED Light
Use the Serial Plotter to watch soundState value change as you talk into the sound sensor.
Change this statement to work better with the sound level in your environment:
if (soundState > 400) {
Then, modify the Arduino sketch to do something different, such as:
When the sound is louder, the light gets brighter
When the sound gets louder, the light blinks faster
your ideas?
Complete: Lesson 7: Displaying Data on OLED
Then, modify the Arduino sketch to do something different, such as:
Change the displayed text
Learn about what you can do with your OLED display.
Use a different font. Or draw a line, circle, or rectangle.
Look at the examples in:
File ... Examples ... Examples from Custom Libraries ... u8g2 ...
You need to specify the OLED display you are using. Remove the comment from this line:
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
There are two libraries you can use with this OLED display. Details:
u8g2 documentation U8g2 Reference Manual U8g2 Fonts
#include <U8x8.h> - text only
#include <U8g2lib.h> - text and graphics (uses more memory)
your ideas?
Complete: Lesson 8: Detecting Surrounding Temperature & Humidity
Breath gently on the sensor to change the temperature and humidity.
Then, modify the Arduino sketch to do something different, such as:
When the humidity increases above a specific level, sound an alarm with the buzzer and display a warning message on the OLED display.
your ideas?
Then, modify the Arduino sketch to do something different, such as:
Show the barometric pressure on the OLED display
Learn about the relationship between barometric pressure and altitude and how to correct the pressure reading:
Barometric Pressure to Altitude (Arduino.cc forum)
Altimeter Setting Calculator (National Weather service)
Show the corrected altitude on the OLED display
your ideas?
Watch videos to learn about acceleration:d, Velocity & Acceleration
Complete: Lesson 10: Sensing Movement
Then, modify the Arduino sketch to do something different, such as:
When acceleration is detected, make a sound with the buzzer.
Different sounds for acceleration in each axis (x, y, z)
your ideas?
Discussion:
Did you find any of these projects interesting?
Any questions about how to build these projects?
What would you like to build?
Build a project of your choice using what you've learned so far.
If you'd like, you can start with one of these projects and modify them:
In the Zoom chat, please answer these questions:
What did you like most about this class?
How could we improve this class?
What will you do with your Arduino kit after this class?
Any questions?