X
Home > Blog > STEM for Arduino > HOW to Make a Rope Skipping Machine with Kidsuno

HOW to Make a Rope Skipping Machine with Kidsuno

By r August 20th, 2024 471 views
1. Overview
Rope skipping machine is used to replace the traditional rope skipping method, which frees our hands. It can not only realize forward and reverse jumps, but also change the speed of skipping ropes according to needs.

2. Components

Img

Img

Img

Img

Kidsuno Mainboard×1

Joystick Module×1

360°Servo×1

Passive Buzzer×1

Img

Img

Img

Connection Wire×2

USB Cable×1

Lego Series×1

Img

3. Installation

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

4. Read the Value of Joystick Module

Img

5. Programming Steps

Step1:Wiring Diagram

Connect the kidsuno mainboard and computer via a USB cable, and connect the joystick module to No.3 interface, passive buzzer to No.2 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:Add Joystick Module

Img

Img

Diagram of the Extension Instruction Block

Img

Add “Joystick Module” Instruction Block

Img

Step3: Description of Building Blocks

Img

This block is used to read the analog value of the X-axis of the joystick module (range: 0~1023).

Img

This block is used to read the analog value of the Y-axis of the joystick module (range: 0~1023).

Img

This block is used to read the button value of the joystick module (1/0).

Img

This block is used to refresh the value of the joystick module.

Step4: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 block Imgin the Control module to the script area.

Img

④ Drag the instruction blockImgin the **I2C Joystick Module ** module to the script area and place it into the block Img.

Img

⑤ Drag the instruction blockImg in the Serial module to the script area, then change “Hello KidsBlock” to “X:” , warp to no-warp.

Img

⑥ Drag the instruction blockImg in the Serial module to the script area and place it into the block Img, then change warp to no-warp.

Img

⑦ Drag the instruction blockImgin the I2C Joystick Module module to the script area and place it into the block Img, then change “button” to “X”.

Img

⑧ Copy blockImgtwice,then change “X: ” to “Y:” and “btn_val:”,and change “X” to “Y” and “button”,the no-warp behind “Button”to warp.

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

Step5: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 analog and digital values read by the joystick module.

In the original state, the read analog values of X and Y are about 512. When moving in the direction of the arrow, the value gradually increases, as the arrow moves in the opposite direction, the value decreases gradually. When the joystick module is not pressed, it is low level (0); when pressed, it is high level (1).

Img

Img

6. Joystick Module Controls Rope Skipping Machine

Img

7. Programming Steps

Step1: Flow Chart

Set the 360° servo angle to 90°(won’t rotate), then read values of the joystick module, if the X value is greater than 512, the rope skipping machine jumps from back to front and the speed changes, otherwise it jumps from front to back. Press the joystick module, passive buzzer will play music, otherwise it won’t play music.

Img

Step2:Add Servo and Passive Buzzer

Img

Step3: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

Step4:Test Result

ClickImgto upload the complete program to the kidsuno mainboard and power up, if the X value is greater than 512, the rope skipping machine jumps from back to front and the speed changes, otherwise it jumps from front to back. Press the joystick module, passive buzzer will play music, otherwise it won’t play music.

5-9

8. Expansion Project
Img
The sample code is below:
Img
HOW to Make a Ferris Wheel with Kidsuno
Previous
HOW to Make a Ferris Wheel with Kidsuno
Read More
How to Program Relay Module on Kidsuno
Next
How to Program Relay Module on Kidsuno
Read More
Message Us