انتقل للمحتوى
Robo EgyptRobo Egypt
☰ Course contents
Robo Maker: home
0. Lab tour1
1. The start: the Arduino6
2. Wiring and the traffic light4
3. Inputs: the button4
4. Sound and movement5
5. Sensors and numbers5
6. Distance, the screen and colours5
7. Motors and the car4
8. The project: the city's smart gate3
9. From blocks to C++ code5
10. Sensors and screens in code5
11. Smart systems5
12. Bluetooth: control from the phone1

The buzzer and the notes

Section 4: Sound and movementLesson 4.1 · ⏱ 7 min

The buzzer plays notes. Every note has a name and a number: C4 (do) = 262 hertz, D4 (re) = 294, and E4 (mi) = 330.

🧩 Do re mi
Blocks: setup — runs once
📌 Note
We put the tune in setup so it plays only once.

📌 Another example: the musical scale

Eight notes from C4 to C5, then silence.

🧩 The musical scale
Blocks: setup — runs once
The buzzer plays
The buzzer plays
✍️ Practise
Play 3 notes.
✍️ Practise here in the lessonor open the lab in a new page ↗
✍️ Practise
Practice: a tune of 5 notes.
✍️ Practise here in the lessonor open the lab in a new page ↗

🎯 Challenge yourself

Easy

Three notes: C4, then E4, then G4.

👀 Show the solution
🧩 Solution
Blocks: setup — runs once
In the lab
In the lab

Result: three notes.

Medium

An ambulance siren: A4 then C5, three times.

👀 Show the solution
🧩 Solution
Blocks: setup — runs once
In the lab
In the lab

Result: two notes taking turns.

Hard

A tune of 5 notes going down: G4, F4, E4, D4, C4.

👀 Show the solution
🧩 Solution
Blocks: setup — runs once
In the lab
In the lab

Result: a tune going down.

Finished the lesson? Mark it so your progress counts.