X
Home > Blog > STEM for Arduino > HOW to Make A Breaker with Kidsuno

HOW to Make A Breaker with Kidsuno

By r August 21st, 2024 454 views
1. Overview
Breaker is a machine that can level out uneven pavement. In this project, we will make one together!

2. Components

Img

Img

Img

Img

Kidsuno Mainboard×1

Button Module×1

270° Servo×1

Connection Wire×1

Img

Img

Img

Wheel×4

USB Cable×1

Lego Series×1

Img

3. Installation

Please refer to the following link:https://kd.kidsbits.cc/KD3020

4. Read the Button Value

Img

5. Programming Steps

Step1:Wiring Diagram

Connect the kidsuno mainboard and computer via a USB cable, and connect the button module to No.2 interface and the 270° 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: Description of Building Blocks

Please refer to Project 02: Mixer

Step3: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 button module is connected to D6 of No.2 interface on the mainboard, then change the number 0 to 6 .

Img

④ Drag the instruction block Imgin 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, then change the number 0 to 6.

Img

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

Img

⑧ Complete Program

Img

Step4: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. The serial monitor will print the value read by the button module, when you press the button on the module, it will output a low level (0); when you release it, it will output a high level (1).

Img

6. Button Controls Breaker

Img

7. Programming Steps

Step1: Description of Building Blocks

This is the variable module. Let’s look at it!

There are commonly used declare global numeric variable type integer name assigned to 0, variable and Set variable to 0 instruction squares:

Img

When you need to use this variable, drag the block directly into the script area to edit it!

Img

It is a conditional statement code executing if-then function: If the logical judgment statement in Img is satisfied, the code statement below then is executed.

Img

It is a conditional loop statement, it will loop forever if the condition in Img is satisfied.

Step2: Flow Chart

Set the 270° servo to 93°. When the button on the module is pressed, the long arm of the breaker will be raised; when released, it will be lowered. (press the button and then release it will complete a beat.)

Img

Step3:Add Servo

Img

Step4:Write the Program

① Find building blocks

(1)Img

(2)Img

(3)Img

(4)Img

(5)Img

(6)Img

(7)Img

(8)Img

② Complete Program

Img

Step5:Test Result
ClickImgto upload the complete program to the kidsuno mainboard and power up. When the button on the module is pressed, the long arm of the breaker will be raised; when released, it will be lowered. (press the button and then release it will complete a beat.)
6-7
HOW to Make a Rope Skipping Machine with Kidsuno
Previous
HOW to Make a Rope Skipping Machine with Kidsuno
Read More
How to Program Relay Module on Kidsuno
Next
How to Program Relay Module on Kidsuno
Read More
Message Us