Link:http://keyestudio-ks5018.readthedocs.io/
-
Download:
-
Click to download: http://xiazai.keyesrobot.cn/KidsBlock.exe
-
-
Tick “Anyone who uses this computer(all users)” and click “Next”.
- Click “Browse...” to choose an installation path of the software, and click “Install”.
- click “Finish”.
- Here is the main interface of Kidsblock. If there is a warningin your computer, just click “Allow access” to enter the software.
- Download Kidsblock package: http://xiazai.keyesrobot.cn/KidsBlock.dmg
- After downloading, click KidsBlock. And then drag the KidsBlock Desktop into Applications.
-
After installation, you can see the icon of KidsBlock.
-
Open KidsBlock, but it cannot be opened, because Mac devices is set that they only allow to open apps from its App store by default. Thus, we need to modify some settings.
-
Open settings and enter Privacy&Security, tick App Store and identified developers in Security. And then click Open Anyway.
-
Click Open and the software can be opened.
-
Now re-open the Kidsblock.
-
Now enjoy your programming!
We demonstrate on Windows, and MacOS users may take as a referance.
If the driver is already installed on the computer, you do not need to install another one. If not, you need to do the following.
- Enter Device Driver Installation Wizard and click “Next”.
- “Finish”.
- “Next”.
- “Finish”.
- If a warning appears, just click “Allow” and “Install”.
- “Finish”.
- “Extract”.
- “Next”.
- Tick “I accept this agreement” and click “Next”.
- “Finish”.
- Click “INSTALL”.
- After the driver is installed, click “OK”.
-
Click Kit and find ESP32 Easy Coding Board to load it. Required sensors and modules are included in it so you do not need to load them one by one.
-
The following interface will appear, and we need to choose the correct port and click Connect.
-
Go to Editor
-
The main interface:
This kit has been integrated required sensors and modules so does not need to be additionally loaded. If you want to add them that are not available in the kit, please refer to these steps.
-
For instance, if you want to load a passive buzzer, click it:
-
When “Not loaded” becomes “Loaded”, the buzzer module is successfully imported.
-
Click the passive buzzer.
-
When you see “Loaded” changes into “Not loaded”, the module is removed from blocks.
-
Method One:
-
Method Two:
-
Connect the board to your computer. If there is no port, please install driver first. Choose the correct board and port and click
-
Wait for uploading.
After setting the baud rate and uploading the code, “Hello KidsBlock” will be printed on the box.
This project is easy to conduct with an ESP32 Easy Coding Board, a USB type-C cable and a computer. The ESP32 Easy Coding Board RGB dot matrix will display a beating heart. It serves as a start for your entry to the programming world!
ESP32 Easy Coding Board *1 | |
---|---|
USB type C cable *1 |
Connect the ESP32 Easy Coding Board to your computer via USB cable.
Please check code in Project 1 file.
Find RGB blocks to change its brightness and colors.
Build blocks:
Initialize the RGB dot matrix.
Set color, brightness and display icons.
Complete code:
After uploading test code to ESP32 Easy Coding Board and powering via USB cable, the RGB dot matrix alternately shows patterns of a small and a large heart.
In this project, we intend to control a certain RGB of the ESP32 Easy Coding Board to be on and off.
ESP32 Easy Coding Board *1 | |
---|---|
USB type C cable *1 |
Connect the ESP32 Easy Coding Board to your computer via USB cable.
The RGB dot matrix has a total of 25 beads, and we mark them as number 0 to 24 from left to right and from top to bottom.
The serial number is as follows:
Find code blocks:
Set one RGB to light up in a certain color:
Build blocks:
The set RGB will light up once per second.
Dot matrices are very commonplace in daily life. They have found wide applications in RGB advertisement screens, elevator floor display, bus stop announcement and so on.
The dot matrix of ESP32 Easy Coding Board contains 25 RGB in a grid. Previously, we have succeeded in controlling a certain RGB to light by integrating its position value into the test code. Theoretically, we can turn on many LEDs at the same time to show patterns, digits and characters.
What’s more, we can also click ”show icon“ to choose the pattern we like to display. Last but not the least, we can design patterns by ourselves as well.
ESP32 Easy Coding Board *1 | |
---|---|
USB type C Cable *1 |
Connect the ESP32 Easy Coding Board to your computer via USB cable.
Find code blocks:
Build blocks:
We set the icon to an arrow and set its brightness and color.
Set the full color brightness and delay time
Complete code:
After uploading test code, the dot matrix start to show arrows in may directions, and then it exhibits two light shows in full color with each for 5 seconds.
Buttons can be used to control circuits. In an integrated circuit with a button, the circuit is connected when the button is pressed and if you release the button, the circuit is open.
Capacitive touch detects the user's operation by measuring changes in capacitance. When you touchg the capacitive sensing area, the charge of the human body affects the value of the capacitor, which can be sensed by the module due to this change.
ESP32 Easy Coding Board boasts three buttons: two programmable buttons (marked with A and B), and a reset button at back. By pressing the two programmable buttons, three different signals can be input. We can press button A or B or both so that the LED dot matrix shows A, B and AB respectively.
Let’s get started!
ESP32 Easy Coding Board *1 | |
---|---|
USB type C cable *1 |
Connect the ESP32 Easy Coding Board to your computer via USB cable.
Find code blocks:
Find "if...then..." block to determine whether the buttons are pressed.
Add buttons and touch:
Choose button A or B in the condition.
Build blocks:
After uploading test code and powering on, the 5x5 dot matrix shows A if button A is pressed, and shows B if button B pressed, and shows AB if button A and B pressed together. When the touching area is touched, it shows T.
Read the touching area analog values.
Find code blocks:
Build blocks:
After uploading test code and setting baud rate to 115200, when you touch this area, the value will reduce to lower than 10.
The board boasts an built-in passive buzzer, which is a device without an oscillating circuit so need an external driving signal to produce sound.
- Passive: Unlike active buzzers, passive buzzers do not include a built-in oscillator circuit, so an external driving signal with a certain frequency is required. This is usually done by a microcontroller or other signal source.
- Frequency control: The frequency of the driving signal determines the frequency at which the buzzer produces sound. By changing the frequency of the input signals, different tones of sound can be played.
- Applications: Passive buzzers are widely used in various electronic devices to provide audio prompts or alerts, such as embedded systems, electronic products, alarm systems, etc.
- Driving: Due to its passiveness, they have relatively low requirements for external drive signals, so they usually only need to provide enough current and the appropriate frequency.
ESP32 Easy Coding Board *1 | |
---|---|
USB type C cable *1 |
Connect the ESP32 Easy Coding Board to your computer via USB cable.
Find code blocks:
Build blocks:
Play do, re, mi, fa, sol, la, si, or you may compose them by yourself.
Integrated musics and songs:
Complete code:
Play do, re, mi, fa, sol, la, si, and a song.
Microphone is a device that converts sound into electrical signals, which is an important part of the audio field. It is widely used in voice recording, communication and audio playback.
Microphones can be divided into many types, including Dynamic Microphone, Condenser Microphone, Wireless Microphone, USB Microphone and Laser Microphone.
In this project, we use a minimal capacitive microphone.
ESP32 Easy Coding Board *1 | |
---|---|
USB type C cable *1 |
Connect the ESP32 Easy Coding Board to your computer via USB cable.
Find code blocks:
Build blocks:
After uploading test code and setting baud rate to 115200, speak to the ESP32 Easy Coding Board or clap your hands or desks, and the analog value of sound will increase. The louder the sound is, the greater the value will be.
We represent the sound on RGB dot matrix, and as the sound gets louder, the lighting RGB will be more.
Initialize RGB.
Determine the sound level and rate it.
RGB display:
Complete code:
Upload test code and power on, and the louder the sound is, the more the RGB will light up.
AHT11 temperature and humidity sensor is equipped on the board, which outputs digital signals. It uses special analog signal acquisition&conversion technology and temperature and humidity sensing technology to ensure that the sensor features good long-term stability and high reliability. The MCU on the ESP32 Easy Coding Board communicates with it via I2C.
ESP32 Easy Coding Board*1 | |
---|---|
USB type C cable *1 |
Connect the ESP32 Easy Coding Board to your computer via USB cable.
Find code blocks:
Build blocks:
After uploading test code, open the serial monitor and set baud rate, and the temperature, humidity and Dewpoint value will be printed.
The MPU6050 is a six-axis motion processor that includes a 3-axis gyroscope and a 3-axis accelerometer. Two sensors integrated on a single chip that can detect static and dynamic object motion states, including angular speed, Angle and acceleration.
The MPU6050 is integrated with a 16-bit ADC that can simultaneously read data from six axes to measure diagonal speed and Angle, and can also infer acceleration information from the object. The MPU6050 also boasts a built-in temperature sensor used to measure the temperature of the chip, helping to monitor the temperature of the sensor during operation.
In addition, the MPU6050 is equipped with a fast Digital Motion Processor (DMP), which helps process raw data from the gyroscope and accelerometer to obtain the motion state of the object.
Typical circuit diagram:
# | NAME | DESCRIPTION |
---|---|---|
1 | GND | Negative interface (0V). |
2 | VCC | Positive interface (3.3V or 5V). |
3 | SDA | I2C data line, connected to MCU, used to transmit data. |
4 | SCL | I2C clock line, connected to MCU, used to synchronize data transmission. |
5 | XDA | I2C data line, connected to external extension sensors, used to transmit data. |
6 | XCL | I2C clock line, connected to external extension sensors, used to synchronize data transmission. |
7 | AD0 | I2C Slave address. The sensor address is 0x69 at high and 0x68 at low. |
8 | INT | External interrupt pin, detects the internal interrupt time of the MPU6050. |
- Operating voltage: 3.3V, 5V
- Static current: 5μA
- Rotating current: 3mA
- Maximum rotation speed: 2000°/s
- Acceleration range: ±2g, ±4g, ±8g, ±16g
- Temperature range: –10 ~ +65°C
MPU6050 can be used to measure the attitude of an object. Measurements of three angles can be provided: roll, pitch and yaw. It can also provide the acceleration of the object, and obtain the speed and position information of the object through calculation.
Its three axises:
The corresponding Euler Angle indicates the Angle of rotation of the object in three-dimensional space, and its coordinate axis can be adjusted arbitrarily.
Euler Angle consists of three angles, namely Roll, Pitch and Yaw.
Roll | Rotation Angle with x-axis as rotation axis |
---|---|
Pitch | Rotation Angle with y-axis as rotation axis |
Yaw | Rotation Angle with z-axis as rotation axis |
When acquiring Yaw, the gyroscope inside the MPU6050 is automatically calibrated to zero, which causes Yaw to drift to zero.
Zero drift means that the detected data will have an accidental small fluctuation, for example, the sensor value will automatically have an accidental small change. Even after a good algorithm, zero drift still exists, as it is limited by hardware.
Solution: add a magnetometer to calibrate the MPU6050.
For more details, please refer to the MPU6050 data sheet:
https://www.invensense.com/wp-content/uploads/2015/02/MPU-6000-Datasheet1.pdf
https://www.invensense.com/wp-content/uploads/2015/02/MPU-6000-Register-Map1.pdf
ESP32 Easy Coding Board*1 | |
---|---|
USB type C cable *1 |
Connect the ESP32 Easy Coding Board to your computer via USB cable.
Find code blocks:
Build blocks:
Initilize serial monitor and MPU6050
This block is used to update the data each time it is fetched
Complete code:
After uploading code and powering on, Put ESP32 Easy Coding Board flatwise on the desk, press the reset button to initialize MPU6050, and wait 2 or 3 seconds.
When the serial monitor shows values, the initialization is completed; and if values on each axis is not greater than 10, the initialization is correct; otherwise you need to re-initialize.
Photoresistors measure light intensity and are commonly used to detect brightness in the surrounding environment.
Working principle: This module is designed by the light-sensitive materials. There are two main types: photoresistor and photodiode.
- Photoresistor: The resistance of a photoresistor varies with the intensity of ambient light. For one photoresistor, the stronger the ambient light is, the lower the resistance will be.
- Photodiode: The current output of a photodiode is proportional to the intensity of the incident light. The electrical signals they produce can be used to measure light brightness.
Applications: Photoresistors are widely applied to various fields, including light control systems, lighting systems, camera exposure control, light monitoring, automatic adjustment of screen brightness, etc.
Unit of brightness: They usually measure light intensity in illuminance units (such as Lux). Illuminance represents the luminous flux per unit area.
ESP32 Easy Coding Board *1 | |
---|---|
USB type C cable *1 |
Connect the ESP32 Easy Coding Board to your computer via USB cable.
Find code blocks:
Build blocks:
Upload the test code and open the serial monitor. When the light intensity detected by the sensor changes, the sensor values will also change.
The SD card module is used in conjunction with the MCU on the ESP32 Easy Coding Board for reading and writing data on the SD (Secure Digital) card. This module makes it easier to use SD cards to store and access data in projects.
- Function: SD card module allows the ESP32 Easy Coding Board to communicate with the SD card to achieve data reading and writing. This is very useful for data logging, file storage, logging, etc.
- Interface: The SD card module usually connects to the ESP32 Easy Coding Board using the Serial Peripheral Interface (SPI) interface. It needs to be connected to the corresponding pin of the ESP32 Easy Coding Board, For example, MOSI (Master Out Slave In), MISO (Master In Slave Out), SCK (Serial Clock), and CS (Chip Select).
- SD card type: SD card modules are generally compatible with various types, including standard SD cards, SDHC cards (High Capacity), and SDXC cards (eXtended Capacity).
ESP32 Easy Coding Board*1 | |
---|---|
USB type C cable *1 | |
SD card *1 (not included in the kit) |
Connect the ESP32 Easy Coding Board to your computer via USB cable.
Insert the SD card into the slot.
Find code blocks:
Initialize the serial monitor and SD card.
Refresh the SD data before using.
Serial monitor outputs type:
Serial monitor outputs messages:
Determine whether there is a ‘’file.txt‘’ file in SD card.
If there is no ‘’file.txt‘’, it create a file and input “hello,world” in a new line.
After that, read the content in ‘’file.txt‘’.
Read all list files in SD card, including hidden files.
Delet this ‘’file.txt‘’.
Complete code:
Serial monitor output:
ESP32 Easy Coding Board boasts a built-in current measurement module (only measure USB power supply and PH2.0 interface power supply) to measure current by a resistive current sensor.
Resistive current sensor is commonly used to monitor the current value by measuring the voltage drop generated by the current through the resistance. The working principle of such sensors is based on Ohm's law, which states that when a current passes through a resistor, the voltage generated at both ends of the resistor is proportional to the current.
- Current sensing: Resistive current sensor contains a current sensing element, usually, a resistor. When current passes through this resistor, a voltage drop will be generated at both ends of the resistor, the magnitude of which is proportional to the strength of the current.
- Volateg output: By measuring the voltage drop at both ends of the resistor, the sensor can provide a voltage signal that is related to current. This voltage signal can be digitally processed by devices like an analog-to-digital converters (ADC).
Resistive current sensors are widely applied to power system monitoring, power consumption measurement of electronic devices, electric vehicle current monitoring and so on.
ESP32 Easy Coding Board *1 | |
---|---|
USB type C cable*1 |
Connect the ESP32 Easy Coding Board to your computer via USB cable.
Read current value:
Complete code:
After uploading test code, open the serial monitor and you will see the current value is 0. Because many modules are not working on the board, so the current is close to 0.
Enable RGB dot matrix and then measure the current value.
Initialize the seial monitor and RGB dot matrix.
First measure 10 RGB beads.
Then measure 18 RGB beads.
Last measure 25 RGB beads.
Complete code:
Upload test code and you will find that the more the beads are, the larger the current will be.
The conversion of current to power: power (P) equals current (I) times voltage (V).
P = IV
- P is power, unit: Watt(W)
- I is current, unit: ampere(A)
- V is voltage, unit: volt(V)
This formula is suitable for DC circuits.
For AC circuits, power calculation may require more complex formulas due to power factor.
In a circuit, power describes the conversion of electrical energy. Input current and voltage values into the above formula and you can get real-time power values.
This is commonly used for energy monitoring, power system management and equipment power consumption evaluation.
The power voltage of ESP32 Easy Coding Board is 3.3V, so we only need to measure the current and multiply it by 3.3 to get the power of the Board at this time.
Find code blocks:
Create valriables P and I.
Assign the read current value to variable I.
I multiplies by 3.3 is power of the ESP32 Easy Coding Board(the board voltage is 3.3V).
Complete code:
Upload code and open serial monitor to set baud rate. The more the beads are, the greater the current value and power will be.
ESP32 Easy Coding Board is built with Wi-Fi (2.4G) and Bluetooth (4.2) to easily connect to a Wi-Fi network and communicate with other devices in the network, so you can use this Board to display web pages in your browser.
- Base mode (STA / Wi-Fi Client mode): ESP32 Easy Coding Board is connected to a Wi-Fi hotspot (AP).
- AP mode (Soft-AP / Wi-Fi hotspot mode): Other Wi-Fi devices connect to ESP32 Easy Coding Board.
- AP-STA mode: ESP32 Easy Coding Board is both a Wi-Fi hotspot and a Wi-Fi device connected to another Wi-Fi.
- These modes support multiple security modes: WPA, WPA2, WEP, etc.
- Wi-Fi hotspots can be searched (active and passive scanning).
- Support hybrid mode monitoring of IEEE802.11 Wi-Fi packets.
For more wifi reference, please visit: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/network/esp_wifi.html
Espressif Official: https://www.espressif.com.cn/en/home
Add an extension of web page editing.
Load it.
You will see code blocks:
Connect to a Wifi and input your wifi name and passwords. After connecting, the IP address will be printed on the serial monitor.
Set up a web component and name as temperature in the unit of ℃.
Add a button module and name as button.
Complete code:
As long as connecting to Wi-Fi, you may use the Web Server Library of ESP32 Easy Coding Board to provide web page.
In the example, we set up a simple web page to display a certain temperature value.
Open your browser to check and visit the IP address of ESP32 Easy Coding Board. Herein, you may access to “http://[IP address of ESP32 Easy Coding Board]” to visit its website.
NOTE: When PC, mobile phone and ESP32 Easy Coding Board are connected to one network, this website(your own IP address of ESP32 Easy Coding Board) can be accessed via PC and mobile at the same time.
PC:
Mobile:
In this project, you will embark on the journey of piano exploration. With eight buttons connected on the board and each one corresponding to one tone, we will learn how to build a basic piano that may open the door to a wonderful world of tone.
The piano is versatile and usually consists of 88 keys, covering a wide vocal range. Tone is the basis of music, which is represented by black and white keys on the piano. In music theory, there are seven basic tones: C, D, E, F, G, A, B. They make up the scale for multiple musical compositions.
-
C(Do)
- On pianos, C is white key at the most left side.
- C is the beginning note of the scale and the first note in the diatonic scale.
- C major: C D E F G A B C
-
D(Re)
- D is the white key next to C.
- D is the second note in scale.
- D major: D E F# G A B C# D。
-
E(Mi)
- E is the white key next to D.
- E is the third note in scale.
- E major: E F# G# A B C# D# E。
-
F(Fa)
- F is the white key next to E.
- F is the forth note in scale.
- F major: F G A Bb C D E F。
-
G(Sol)
- G is the white key next to F.
- G is the fifth note in scale.
- G major: G A B C D E F# G。
-
A(La)
- A is the white key next to G.
- A is the sixth note in scale.
- A major: A B C# D E F# G# A。
-
B(Si)
- B is the white key next to A.
- B is the seventh note in scale.
- B major: B C# D# E F# G# A# B。
These seven basic tones and the interstitial relationships among them form the basis of music. With these tones, different scales, chords and melodies can be composed. Beyond that, semitone and whole tone are also included to have a better understanding of more complex aspects of music. Learning music theory can help piano players perform compositions.
In this kit, in addition to the 7 basic syllable keys, there is also a high syllable key, totaling eight keys, enabling the playing of more intricate melodies.
Button | Pin |
---|---|
C | io14 |
D | io4 |
E | io15 |
F | io32 |
G | io18 |
A | io19 |
B | io23 |
C | io5 |
Connect ESP32 Easy Coding Board to your computer via USB cable.
Determine the pin state. When the pin is at high, serial monitor prints 1. Otherwise, it prints 0.
Open serial monitor. When we press button C, 0 is displayed. When we release, 1 is shown.
After reading the value, determine the button state through the value. When the button is pressed, the C tone is emitted from the buzzer.
Here a not block is required to invert the obtained value.
When the button C is pressed, the piano plays a Middle C Tone.
We now make all eight buttons to be able to play tones by pressing them.
Duplicate the code block, as shown below. And then modify the tones and pins one by one.
Set pins to input.
Modify the button value and tone of the code blocks.
Each button corresponds to the related Middle Tone, and when you press them, the tone will be played.
To enrich the music, high, middle and low tone are inevitable. Yet only eight buttons integrated in the piano. Therefore, we may program to shift tones by the two programmable buttons and the touching area, which just correspond to high, middle and low.
We create three tone functions first.
Create “low-pitched”, “mid-pitched”, “high-pitched” functions.
Read the button value to determine the state of button A and B on the board as well as the touching area.
Make a variable pitch.
When pitch=0, piano is in low tone.
When pitch=1, piano is in middle tone.
When pitch=2, piano is in high tone.
When Button A on the board is pressed, piano is in low tone.
When the touching area on the board is touched, piano is in middle tone.
When Button B on the board is pressed, piano is in high tone.
In this project, we integrate the RGB dot matrix to the piano to display different icons when pressing different buttons.
Initialize RGB dot matrix.
Here we set to letters corresponding to buttons. You can modify to any other icons as you like.
Press the piano button, and RGB dot matrix will show related tone:
We will program to build a music box so that we can change songs by pressing buttons.
Initialize RGB dot matrix and pins.
Define a music function
Customize the tone, or select built-in music.
A: 4 AAA batteries. Please mount batteries in a correct way. Do not insert the them backwards! For children, please be accompanied by parents!
A:
- Please check whether the USB port is correct.
- Please check whether the board model is correct.
A: This kit is able to connect to external modules. When connecting, please check the ESP32 pin instructions to ensure a right installation so that modules can work properly.
-
Keyestudio Official:
-
Keyestudio wiki:
-
ESP32 development board:
-
Arduino Official:
-
ESP32 Espressif Official: