Project 04: Ferris Wheel

4-1

1. Overview

When it comes to the Ferris wheel, we must be familiar with it. Sitting on the Ferris wheel, we are able to overlook the surrounding scenery from a height. Thus, in this project, we will work to make a Ferris wheel that can be viewed in the rain.

2. Components

Img

Img

Img

Img

Kidsuno Mainboard

Steam Sensor×1

Passive Buzzer×1

360°Servo×1

Img

Img

Img

Connection Wire×2

USB Cable×1

Lego Series×1

Img

3. Installation

Preparation:

Img

Step1:

Img

Step2:

Img

Step3:

Img

Step4:

Img

Step5:

Img

Step6:

Img

Step7:

Img

Step8:

Img

Step9:

Img

Step10:

Img

Step11:

Img

Step12:

Img

Step12:

Img

Step13:

Img

Step14:

Img

Step15:

Img

Step16:

Img

Step17:

Img

Step18:

Img

Step19:

Img

Step20:

Img

Complete:

Img

4. Play Music

Img

5. Programming Steps

Step1:Wiring Diagram

Connect the kidsuno mainboard and computer via a USB cable, and connect the steam sensor to No.7 interface, passive buzzer to No.6 interface and the 360° servo to the G, V and D13 interface of the mainboard. The brown wire is connected to G, the red wire is connected to V and the orange wire is connected to D13.

Img

Step2: Write《Twinkle, twinkle, little star!》

Img

Step3:Add Passive Buzzer Command Module

Img

Img

Diagram of the Extension Instruction Block

Img

Add “Passive Buzzer” Instruction Block

Img

Step4: Description of Building Blocks

Img

Set the play frequency of the passive buzzer to the specified pin.

Img

Set the play frequency and beat of the passive buzzer to the specified pin.

Img

Set the passive buzzer to play specific music to the specified pin.

Img

Set the passive buzzer to the specified pin without sound.

Step 5:Write the Program

① Drag the instruction block Imgin the Events module to the script area.

Img

② Drag the instruction blockImgin the Passive Buzzer module to the script area. Since the interface of the passive buzzer module is connected to the D4 pin of the No. 6 interface on the mainboard, change the number 2 to number 4. This module can play different notes via the parameter “NOTE_C4”, and the parameter “1/4” can be used to adjust beat. (C4 refers to playing in the midrange state, where 4 represents the pitch of the note, and it can also be replaced by D4, G4 and A4 )

Img

③ DuplicateImg13 times, then change NOTE_C4 and 1/4, as shown below:

Img

④ Drag the instruction blockImgin the Passive Buzzer module to the script area, then change the number 2 to number 4.

Img

⑤ Complete Program

Img

Step 6:Test Result

ClickImgto upload the complete program to the kidsuno mainboard and power up, then passive buzzer will play music.

6. Steam Sensor Detects Water

Img

7. Programming Steps

Step1: Write the Program

① Drag the instruction block Imgin the Events module to the script area.

Img

② Drag the instruction block Imgin the Serial module to the script area and take the baud rate 9600 as an example.

Img

③ Drag the instruction blockImg in the Pins module to the script area. Since the steam sensor is connected to A0 of No.7 interface on the mainboard, then change the number 0 to A0 .

Img

④ Drag the instruction block Img)in the Control module to the script area.

Img

⑤ Drag the instruction blockImg in the Serial module to the script area.

Img

⑥ Drag the instruction block Imgin the Pins module to the script area and put it into the block Img.

Img

⑦ Drag the instruction block Imgin the Control module to the script area and change the number 1 to 0.3.

Img

⑧ Complete Program

Img

Step2:Test Result

ClickImgto upload the complete program to the kidsuno mainboard and power up, then click Img in the serial monitor area to set the baud rate to 9600. Then the serial monitor will print the value read by the steam sensor.

Touch the metal detection area on the sensor with a moistened finger, the larger the area, the greater the value!

Img

8. Steam Sensor Controls Servo and Buzzer

Img

9. Programming Steps

Step1: Flow Chart

Set the 360° servo angle to 90°, then read the analog value of the steam sensor. When the analog value is greater than 500, the servo and Ferris wheel will rotate, and the buzzer will play music; otherwise, the the servo and Ferris wheel will not rotate, and the buzzer does not sound.

Img

Step2:Add Servo Instruction Block

Img

Step3:Write the Program

① Find building blocks

(1)Img

(2)Img

(3)Img

(4)Img

(5)Img

(6)Img

(7)Img

② Complete Program

Img

Step4:Test Result

ClickImgto upload the complete program to the kidsuno mainboard and power up, then drop water on the metal detection area of the sensor. When the analog value is greater than 500, the servo and Ferris wheel will rotate, and the buzzer will play music; otherwise, the the servo and Ferris wheel will not rotate, and the buzzer does not sound.

4-23

10. Expansion Project

Img

The sample code is below:

Img