Course Content
The Arduino UNO
In the following three lessons, you will get to know your microcontroller - the Arduino UNO. You will learn more about its history, its functions, and most importantly: how to power it.
0/3
The Arduino IDE
For beginners, the Arduino IDE (Integrated Development Environment) is usually the first choice – and for good reason. You can program all Arduino boards with it and manage libraries for sensors, displays, etc. It also features the "Serial Monitor," where you can output data and troubleshoot.
0/2
Your first sketch
In the following lessons, you'll get to know the basic structure of an Arduino sketch and write your own programs. Let's get started!
0/2
The Serial Monitor
Now let's turn our attention to the Serial Monitor – a feature of the Arduino IDE that you will use in virtually every one of your projects.
0/2
Variables
No programmer can avoid variables. In the following lessons, you'll learn what types there are and what you can do with them.
0/3
Controlling an LED
Now it's time for more hardware! In the next lessons, you'll connect an LED to your Arduino. You'll first turn it on and off with a button. After that, you'll build a dimmer to control the brightness of the LED.
0/6
Lie Detector
Discover the entertaining side of electronics by building your own simple lie detector with your Arduino. This fun project uses basic components to measure skin resistance changes when someone might be telling a fib, perfect for adding some playful suspense to your next gathering with friends.
0/1
There’s music inside!
Your Arduino can do much more than "just" make LEDs shine at different brightness levels. For example, it can make music. In the following lesson, you'll learn how to use a piezo buzzer and coax some charming tones out of it.
0/3
A Theremin with Ultrasound
Do you want to make a bit more music? In this lesson, you'll build a theremin that you operate with your HC-SR04 ultrasonic sensor. You move your hand toward and away from the sensor - your Arduino calculates the pitch of the tones from the distance, which are then played through your piezo buzzer.
0/5
The Sound Sensor
Ready to explore how your Arduino can respond to sounds? In this lesson, we'll connect a sound sensor to your Arduino and learn how to make it respond to both digital noise detection and analog volume levels.
0/1
Build an Alarm System
In this project, you will build your own alarm system. It consists of three components: the sound sensor, which you have just learned about, the active piezo buzzer, and the RGB LED.
0/2
The DHT11 Temperature Sensor
Let's move on to another component that you'll certainly use in many projects: the temperature sensor. In this case, the popular DHT11, which can measure not only temperature but also humidity.
0/3
Arduino Course for Beginners

In this lesson, you’ll build the alarm system step by step. You’ve already installed the sound sensor. If you’ve removed it from your breadboard in the meantime, that’s not a problem. You can find the connections in the sketch below. However, for the alarm system, you only need the analog output (AO) of the sensor. You can omit the cable on the digital output.

Connect the active piezo

You’ve already encountered the passive piezo buzzer with the music box and theremin. As you know, you can generate different tones with it. Not so with the active piezo: this component can only generate a single tone – and does so as soon as it receives power. However, this is completely sufficient for an alarm system.

If you’re not sure whether your piezo is active or passive, simply apply 5V voltage directly from your Arduino. Does a tone sound? Then it’s the active piezo that you need for this project.

The connection is very simple. Connect the short leg of the piezo buzzer to minus (ground) and the long leg to digital pin 4 on your Arduino. When the sound sensor triggers an alarm later, you’ll send current to the piezo through this pin, which will then start to beep.

Aufbau Alarmanlage Piezo RGB-LED

___STEADY_PAYWALL___

The RGB LED connection

Connecting this LED is a bit more complex. It has a total of 4 legs: a cathode, which you connect to minus (ground), and three anodes – one each for the colors red, green, and blue. As you’re used to with “regular” LEDs, you also need to install a 220Ω resistor here – one for each anode.

Connect the three anodes to digital pins 9, 10, and 11. These three pins have pulse width modulation (PWM), which you’ve already learned about when controlling the brightness of a simple LED.

The color channels and Arduino pins shown above may not match up depending on the type of LED you have. In the example below, the red color channel is to the right of the cathode, which might be different for your LED. However, you can easily figure this out and fix it when you switch the color of the light later: simply adjust the variables in the sketch and write the correct pin behind the color channel:

int ledRed = 10;
int ledGreen = 9;
int ledBlue = 8;

 

If you’ve set up and wired everything as shown in the sketch above, you can continue with the code in the next lesson.

We don't track you. Enjoy your cookies while making awesome projects!