Welcome to World of Module Sensor Kit repository
2.4 Programming block reference manual
We need to add the building block software extension package of this kit, the package URL: https://github.com/YahboomTechnology/Module-World
The content of this introduction is mainly divided into digital category, analog category, PWM category, color recognition, digital tube, the color of different types of blocks is different.
Users can quickly locate and find by the color of the building blocks.
1. Digital category programming building blocks
1.1 Temperature Humidity module
Connect the temperature and humidity module to the P0P1 pin of Micro:bit and get the current temperature. You can click temperature(℃) to switch to get Fahrenheit temperature or humidity, or click P0P1 to switch to connect to other pins.
Eg: Connect the temperature and humidity module to the P0P1 interface of the micro:bit expansion board, and the LED of the Micro:bit motherboard will display the current ambient temperature in cycles.
1.2 Ultrasonic module
Connect the ultrasonic module to the P0P1 pin and get the current ultrasonic distance. You can click P0P1 to switch to connect to other pins.
Eg: Connect the ultrasonic module to the P0P1 interface of the micro:bit expansion board, and micro:bit LED dot matrix will display the obstacle distance in a loop.
1.3 Human body infrared module
Connect the human infrared module to the P0P1 pin and return to the detected infrared state of the human body.
There are two states that can be selected, no one is moving and one is moving. You can click NoPIR to switch status. You can click P0P1 to choose pins.
Eg1: Connect the human infrared module to the P0P1 pin. If a person is detected, the number 1 will be displayed, and if it is detected that no one is moving, the number 0 will be displayed.
1.4 Infrared module
Connect the infrared module to the P0P1 pin and return to the detected infrared state of the obstacle.
There are two states that can be selected, there are obstacles and no obstacles. You can click obstacle to switch status. You can click P0P1 to choose pins.
Eg: Connect the infrared module to the P0P1 pin. If an obstacle is detected, the number 1 will be displayed, and if an obstacle is detected, the number 0 will be displayed.
1.4 Button module
Connect the button module to the P0P1 pin and return to the installed state of detection. There are two states to choose from: press and release. You can click Press to enter the selection interface, and select release to switch to status.
Eg: Connect the button module to the P0P1 pin, if the button is detected to be pressed, the number 1 is displayed, otherwise the number 0 is displayed.
2. Analog category programming building blocks
2.1 Photosensitive module
Connect the photosensitive module to the P0P1 pin and return the detected light intensity value. The return value is 0-1024. The greater the light intensity, the greater the returned value.
Eg: Connect the photosensitive module to the P0P1 pin, and the dot matrix displays the current light intensity. The greater the light intensity, the greater the returned value.
2.2 Rocker module
Rocker module can be regarded as a potentiometer with two channels, which can output the X-axis and Y-axis analog values. The X and Y values of the initial output are 512. Because of the difference between each rocker, the initialization value may be a little different. The value of the rocker module will increases from the left to the right of the X axis, and the value of the rocker module will decreases from the down to the up of the Y axis. X axis and Y axis output analog value range: 0 ~ 1023.
Near the terminal port is the down direction of the Y direction. Using this as a standard to distinguish the X direction and the Y direction. For example, when the X-axis direction moves to the left, the output X value will become smaller; when the X-axis direction moves to the right, the output X value will become larger. When the Y-axis direction moves to the up, the output Y value will become larger; when the Y-axis direction moves to the down, the output Y value will become smaller.
Connect the joystick module to the P0P1 pin and return to the detected installation state. There are five states available for selection: NoState, Up, Down, Left, and Right. You can click NoState to enter the selection interface and switch to other options.
Eg: Connect the rocker module to the P0P1 pin, if you move the joystick upwards, the dot matrix will display an upward arrow;
if you move the joystick upwards, the displayed arrow will go down;
if you move the joystick to the left The displayed arrow is to the left;
if you move the joystick to the right, the displayed arrow is to the right.
3. PWM category
3.1 Servo
Connect the 360°servo to the P1 pin and drive the servo to the 0° position.
Eg: Connect the 360° servo to pin P1, servo will rotate to the 0° position, and start to rotate counterclockwise. It rotates 90° at an interval of 1 second.
When it reaches 360°, it starts to rotate clockwise. It rotates 90° at an interval of 1 second, until servo rotate 0°. And keep the loop like this status.
3.2 Color recognition sensor
Before using Color recognition sensor, we need to add the extension package of this kit, the package URL:
https://github.com/YahboomTechnology/module_world_color
The programming block indicates the value of the color recognition sensor. There are three return values: R value, G value, and B value.
You can click the small triangle above R value to enter the selection interface and switch to other options.
Eg: Connect the color recognition module to the IIC interface (VCC, SCL, SDA, GND), and display the current R, G, B values read by the color sensor.
3.3 Digital Tube module
Before using Digital Tube module, we need to add the extension package of this kit, the package URL:
https://github.com/YahboomTechnology/tm1650
We can choose to display characters and numbers.
Eg: Connect the digital tube to the IIC interface (VCC, SCL, SDA, GND) and display the number 1234.
