Project 4 Nano goes to school

1.Description

Nano often goes to school by school bus, but he often misses the school time while waiting for the bus in a daze. What can we do to help Nano?

In this project, there is a buzzer that can make sound, which can be used to remind Nano. Let’s move hands together to achieve this interactive experiment!

Task analysis

Sensor

Buzzer Module

Role

Nano

Place

Urban

Result

The buzzer beeps as the school bus approaches the Nano

2.Passive Buzzer Introduction

The keyestudio passive buzzer module mainly consists of a passive buzzer without oscillating circuit. When using, we can input square waves of different frequencies and lengths at the signal end of the module to make the buzzer emit different sounds.

What’s more, we can make the buzzer on the module play a complete song by setting. There are 6 ports on the module and those marked in the same name are connected.

When using, we solely need to connect any G end to the GND end of the control board, V end to the 5V end, S end to the signal end with PWM function (3, 5, 9, 10, 11).

Specifications

  • Operating voltage: DC 3.3-5V

  • Input signal: Digital signal(PWM)

  • Dimension: 31mm27mm4.5mm

  • Weight: 2.3g

  • Environmental protection attributes: ROHS

3.Components Needed

Control Board * 1

USB Cable*1

Alligator Clip to Dupond Wire*3

Buzzer*1

4、Connection Diagram

5.Test Program

1.Open“KidsBlock”software to create a new project.

2.Select “Urban”:click the background library iconin the lower right corner to select Urban.

3.Delete the beetle role

4.Select “Nano”and“City Bus”:click the role library iconin the lower right corner to select “Nano”and“City Bus”.

5.Modify the position and size of the role (you can also drag the role to the position in the picture)

6.Build the program

①Select “City Bus”and build the program.

②Select nano and build the program

6.Complete Program

7.Test Result

Connect the device and select the port, click,then the program will start to run. When the school bus drives to the position of Nano, the buzzer will beep. If Nano gets on the bus, the school bus will leave and the action will be repeated. Click,then the program will stop running.

7.Program Explanation

Instruction

Function

Module

Execute it repeatedly

Control

School bus drives to the position of Nano

Movement

The buzzer will beep.
The buzzer is connected to pin3 of the control board, so the code block here is pin3, and 56 is the size of the output square wave.

Pin

The buzzer will not beep

Pin

The school bus leaves in 1s

Movement

The school bus will back to square one

Movement

image-20251208100326700

Show and hide the Nano role

Appearance