www.adeept.com Content About Micro bit ............................................................................................................................ - 1 Lesson 01 Download the Program onto Micro bit ....................................................................... - 7 Lesson 02 MU microPython repl ................................................................................................ - 11 Lesson 03 Use of simulators .............................................................
www.adeept.com About Micro bit From dancing robots to banana keyboards, your micro: bit has all the features you need to code awesome stuff - the possibilities are endless! In 2015, BBC launched the second programmable micro computer, and it is a super mini computer which can be put in your pocket, meanwhile, it can help young people learn basic programming knowledge with low cost. In 2016, 100 million micro computers have been provided for middle and primary school students in Britain.
www.adeept.com Your micro: bit has the following physical features: LEDs LED stands for Light Emitting Diode. The micro: bit has 25 individually-programmable LEDs, allowing you to display text, numbers, and images. Buttons There are two buttons on the front of the micro: bit (labelled A and B). You can detect when these buttons are pressed, allowing you to trigger code on the device. Pins There are 25 external connectors on the Light edge connector of theSensor micro: bit, which we refer to as 'pins'.
www.adeept.com By reversing the LEDs of the screen to become an input, the LED screen works as a basic light sensor, allowing you to detect ambient light. Temperature Sensor This sensor allows the micro: bit to detect the current ambient temperature, in degrees Celsius. Accelerometer An accelerometer measures the acceleration of your micro: bit; this component senses when the micro: bit is moved. It can also detect other actions, e.g. shake, tilt, and free-fall.
www.adeept.com Compass The compass detects the earth's magnetic field, allowing you to detect which direction the micro: bit is facing. The compass has to be calibrated before it can be used. 'Calibrating' the compass ensures the compass results are accurate. For the JavaScript Blocks Editor, use the 'calibrate compass' block. To calibrate the compass in Python use compass.calibrate(). When the calibration begins, the Radio The radio feature allows you to communicate wirelessly between micro: bits.
www.adeept.com USB Interface The USB interface allows you to connect the micro: bit to your computer via a micro-USB cable, which will power the device and allow you to download programs onto the micro: bit. If you have any question when you use it, you can post on our official forum, we will solve it immediately. The forum website is: http://www.adeept.com/forum Tutorials linkage: http://www.adeept.
www.adeept.com Introduction of AdeeptV3.0 expansion board. Our microbit 3.0 expansion board isas follow: There is no difference from the previous version of the appearance, but we added a 5V power supply port on this expansion board. Many customers report the problems of insufficient power supply, such as dim LCD 1602 display, insensitive servo, and difficult-to-start motor. By charging these devices with 5V, the problems will be solved.
www.adeept.com Lesson 01 Download the Program onto Micro bit Introduction In the first lesson, we will learn how to display a heart on micro: bit The preparation before class: One piece of BBC micro: bit development board, A USB cable with data transmission function->start make code programming tool Operating steps 1.Click the block “On Start” in “Basic” 2.Then we place the block “Show Icon” in the block “On Start”, we can see that the heart will be inosculated.
www.adeept.com 3. Now we can see that the Simulate Toolbar in the left shows the effect 4.Next click the button below. 5.Now connect the micro: bit development board with the computer->click “My Computer” we can see that a new disk has been added->move the program that has been downloaded successfully to the disk.
www.adeept.com 2. Click the button “Download”, when it is finished we only get ZIP compressed files. 3. Next, extract the compressed files to any folder. 4. Then open the first file after uncompress.
www.adeept.com 5. When it shows the icon below, it means waiting for downloading, we can minimize it but can’t quit. Click the button “Download” directly and we can download the program onto micro: bit. 6.Now we can see a heart on micro: bit development board.
www.adeept.com Lesson 02 MU microPython repl Introduction In this class, we will learn how to install the offline version of MU Operating steps Download and install steps: 1.Enter https://codewith.
www.adeept.
www.adeept.com 5. Add another REPL plug-in we can display data through gorge line, the download link is http://cdn.kittenbot.cn/mbedWinSerial_16466.exe When finish downloading, we can use it directly 6.In the next lessons, we will use Python language to programming, now we begin the journey of programming.
www.adeept.com Lesson 03 Use of simulators Introduction In this lesson, let’s learn about the simulators of MU microPython. Operating steps 1. We only need to prepare a micro:bit and a USB cable. 2. Then connect them and plug into the computer. 3. Open the editor of MU microPython. Open the code Lesson 03 Use of simulators->code->Accelerometer.py 4. Click “Flash” and download the code onto the micro: bit 5. Now open repl, then press the reset button on the microbit, you can see the data is displayed. 6.
www.adeept.com Summary: Through this lesson, I believe that you have learned the use of the simulator and the plotter, through which you can visually observe the changes of the data.
www.adeept.com Lesson 04 Compass Introduction In this lesson, let’s make a compass. What is compass? The compass is one of the four inventions in ancient China. It is a simple instrument for discriminating orientation. Our mobile phones also have this function.
www.adeept.
www.adeept.com Lesson 05 Light level Introduction In this lesson, Let's make a smart table lamp with the light sensor on the micro:bit. The light sensor is integrated on the 5x5 matrix LED of micro:bit. Operating steps 1. Just prepare a micro:bit and a USB cable and bring your own flashlight (the phone’s built-in camera flash) 2. Connect the microbit to the computer with the USB cable. Experimental code: Lesson 05 Light level->code->microbit-Light_Level.hex 3.
www.adeept.
www.adeept.com Summary: Through this lesson, we can have a clear picture of the working principle of the smart table lamp. Also we know that the micro:bit is small but strong. The 5*5 LED not only can display pattern and scroll text, but also integrates the light sensor.
www.adeept.com Lesson 06 LED module Introduction This lesson, we will take you to learn how to let an LED blink. What is LED? The LED is the abbreviation of light emitting diode. It is usually made of gallium arsenide, gallium phosphide semiconductor materials. The LED has two electrodes, a positive electrode and a negative electrode, it will light only when a forward current passes, and it can be red, blue, green or yellow light, etc. The color of light depends on the materials it was made.
www.adeept.com Operating steps 1. First, we need to prepare the following experimental materials: 1 * microbit 1 * microbit 1 * led module - Several Jumper wires 2. We can see that the module has three interfaces, but here we only need to connect two wires. 3.
www.adeept.com 4. Experimental code: Lesson 06 LED module->code->microbit_led.hex Lesson 06 LED module->code->led.py 5. Click “flash” and download the code onto the micro:bit. 6. We can see the LED is blinking.
www.adeept.com Summary: Through this lesson, I believe you know what LED and resistor are and how to use micro:bit to control the LED blinking.
www.adeept.com Lesson 07 Button module Introduction In this lesson, let’s learn about controlling the matrix LED of micro:bit to display smiles through the button module. What are buttons? Buttons are a common component used to control electronic devices. They are usually used as switches to connect or disconnect circuits. Although buttons come in a variety of sizes and shapes, the one used in this experiment will be a 12mm button as shown in the following pictures.
www.adeept.com S Digital keys output + 3.3v - GND Operating steps 1. First, we need to prepare the following experimental materials: 1 * button - Several Jumper wires 2.
www.adeept.com 3. Experimental code: Lesson 07 Button module->code-> microbit-Button.hex Lesson 07 Button module->code-> Button.py 4. Click “flash” and download the code onto the micro:bit.
www.adeept.com Lesson 08 Switch module Introduction In this lesson, we will learn about the reed switch. Operating steps 1. First, we need to prepare the following experimental materials: 1 * Microbit 1 * Microbit expansion board 1 * USB cable 1 * Switch button module - Several Jumper wires 2. Connect the reed switch to the micro:b.
www.adeept.com 3. Experimental code: Lesson 08 Switch module->code-> microbit-Switch_button.hex Lesson 08 Switch module->code-> Switch_button.py 4. Click “flash” and download the code onto the micro: bit.
www.adeept.
www.adeept.com Lesson 09 Touch module Introduction In this lesson, we will learn about the touch switch. What is touch button module? The Touch Button Module is a touch switch module developed based on the principle of capacitive sensing. Touch of human or metal onto the gilded touch surface can be sensed. Besides, it can also detect other such touch with certain materials like plastic and glass between.
www.adeept.com 1 * Touch button module - Several Jumper wires 2. connection diagram: 3. Experimental code: Lesson 09 Touch module->code-> microbit-Touch_button.hex Lesson 09 Touch module->code-> Touch button.
www.adeept.com 4.
www.adeept.com Lesson 10 Active buzzer Introduction In this lesson, let’s learn about how to use the active buzzer. What is buzzer? A buzzer or beeper is an audio signaling device. As a type of electronic buzzer with integrated structure, which use DC power supply, buzzers are widely used in computers, printers, photocopiers, alarms, electronic toys, automotive electronic equipment, telephones, timers and other electronic products for voice devices.
www.adeept.com 3. Experimental code: Lesson 10 Active buzzer->code-> microbit-Active-buzzer.hex Lesson 10 Active buzzer->code-> Active_buzzer.py 4. Click “flash” and download the code onto the micro:bit. Now you can hear the buzzer sounding.
www.adeept.
www.adeept.com Lesson 11 Passive buzzer Introduction In this lesson, we learn about how to use the passive buzzer. Passive buzzer The HZ of the sound can be controlled, and it can make the effect of Do Rai Mi Fa So La Xi Do The main difference of active buzzer and passive buzzer: the input signal for products is different. Operating steps 1. First, we need to prepare the following experimental materials: 1 * microbit 1 * microbit expansion board 1 * USB cable 1 * Passive buzzer - Several Jumper wires 2.
www.adeept.
www.adeept.com 3. Experimental code: Lesson 11 Passive buzzer->code-> microbit-Passive-buzzer.hex Lesson 11 Passive buzzer->code-> Passive_buzzer.py 4. Click “Download” and download the code onto the micro:bit.
www.adeept.com Summary: Through these two experiments, I believe that you have already known the difference between active buzzer and passive buzzer.
www.adeept.com Lesson 12 RGB LED Introduction In this lesson, let’s learn about the RGB LED. What is RGB? The RGB LED consists of three LEDs. Each LED has a red, a green and a blue light. The three-color LEDs can produce any color; it contains the red, green and blue emitters, typically with a four-wire connection and a common wire (anode or cathode). These LEDs can have a common anode or a common cathode wire. We used the common anode RGB LED in this experiment.
www.adeept.com Operating steps 1. First, we need to prepare the following experimental materials: 1 * microbit 1 * microbit expansion board 1 * USB cable 1 * RGB LED module - Several Jumper wires 2.
www.adeept.com 3. Experimental code: Lesson 12 RGB LED->code->microbit-RGB-LED.hex Lesson 12 RGB LED->code->RGB.py 4. Click “flash” and download the code onto the micro:bit. Now we can see that the RGB LED is changing colors.
www.adeept.com Summary: Through this lesson, I believe that you have already known how to control RGB LED. Hope you can do more related expansion experiments and consolidate what you have learned.
www.adeept.com Lesson 13 Temperature alarm Introduction In this lesson, let’s learn about the temperature alarm. Operating steps 1. First, we need to prepare the following experimental materials: 1 * microbit 1 * microbit expansion board 1 * USB cable 1 * Active buzzer - Several Jumper wires 2. Connect the active buzzer to micro:bit.
www.adeept.com 3. Experimental code: Lesson 13 Temperature alarm->code->microbit-Temperature.hex 4. Click “Download” and download the code onto the micro:bit. When I put my hand on the temperature sensor of the micro:bit, the buzzer will sound as the temperature exceeds the value set before (the temperature needs to be set according to the actual environment).
www.adeept.com Lesson 14 PIR control led Introduction In this lesson, let’s learn how to control a LED with PIR Sensor. PIR Sensor: The sensor has the markings "OUT", "-" and "+" (for output, GVD and +3.3 V). PIR sensors will respond to animals such as cats and dogs, as well as humans and other heat sources. When a motion is detected by PIR sensor, the value of the output end will rise. S Digital output 3.3V 3.3V - GND Operating steps 1.
www.adeept.com - Several Jumper wires 2. Connect the PIR Sensor to micro:bit. connection diagram: 3. Experimental code: Lesson 14 PIR control led->code-> microbit-PIR-sensor.hex Lesson 14 PIR control led->code-> PIR_sensor.py 4. Click “Download” and download the code onto the micro:bit. When we approach the PIR sensor with our hands, the LED will illuminate and it will be off three seconds after we leave our hands.
www.adeept.
www.adeept.com Lesson 15 Photoresistor Introduction In this lesson, let’s learn about the use of the external photoresistor of the micro:bit. What is photoresistor? A photoresistor is a light-controlled variable resistor. The resistance of a photoresistor decreases with the increasing incident light intensity; in other words, it exhibits photoconductivity. A photoresistor can be applied in lightsensitive detector circuits. A photoresistor is made of a high resistance semiconductor.
www.adeept.com Operating steps 1. First, we need to prepare the following experimental materials: 1 * microbit 1 * microbit expansion board 1 * USB cable 1 * Photosister module - Several Jumper wires 2. Now we connect the photoresister to micro:bit.
www.adeept.com 3. Experimental code: Lesson 15 Photosister->code-> microbit-Photosister-val.hex Lesson 15 Photosister->code-> Photoresistive.py 4. Click “Download” and download the code onto the micro:bit. The value of the photoresistor can be seen on the matrix LEDs.
www.adeept.com Summary: Through this lesson, I believe you have mastered the use of photoresistors. Hope you can make more interesting experiments based on this lesson.
www.adeept.com Lesson 16 Neopixel Introduction In this lesson, we will learn about the RGB LED circle. Description: WS2812B is an intelligent external control LED light source integrating control circuit and light-emitting circuit. Its shape is the same as a 5050 LED bead, and each component is a pixel. The pixel includes the intelligent interface, data latch signal, shaping and amplifying driving circuit and the anti-reverse circuit.
www.adeept.com Symbol Pin Function description VDD Power Power supply DOUT Data output Control data signal output VSS Ground Signal grounding and power grounding DIN Data input Control data signal input LED characteristic parameter Emitting Dominant luminous Working Working Color wavelength intensity current voltage(V) (nm) (mcd) (mA) Red 620-630 550-700 20 1.8-2.2 Green 515-530 1100-1400 20 3.0-3.2 Blue 465-475 200-400 20 3.2-3.
www.adeept.com Red pin VCC Black pin 3.3V Yellow pin Digital in Operating steps 1. First, we need to prepare the following experimental materials: 1 * microbit 1 * microbit expansion board 1 * USB cable 1 * WS2812B Neopixel - Several Jumper wires 2. Now we connect the LED circle to the micro:bit.
www.adeept.com 3. Experimental code:we need to add a library on makecode, then input Neopixel.
www.adeept.com click the first download, it will automatically dowanload.
www.adeept.com Lesson 16 Neopixel->code-> microbit-Untitled.hex Lesson 16 Neopixel->code-> RGB led bar.py 4. Click “flash” and download the code onto the micro:bit. Now we can see that the RGB LED circle is on and we can let the circle run in various states. Effect Picture: Summary: Through this lesson, I believe that you have known how to control WS2812B by micro:bit. You can make the LED circle even more colorful.
www.adeept.com Lesson 17 Flame sensor module Introduction In this lesson, let’s learn about the flame sensor. What is flame sensor? Module features: 1、 Can detect flame or light source with wavelength in the range of 760 nm to 1100 nm. The larger the flame, the farther the test distance is. 2、 The detection angle is about 60 degrees; Particularly sensitive to the flame spectrum. 3 、Sensitivity is adjustable (adjusted by the blue digital potentiometer in the figure).
www.adeept.com Operating steps 1. First, we need to prepare the following experimental materials: 1 * microbit 1 * microbit expansion board 1 * USB cable 1 * Flame Sensor 1 * Lighter with visible flame or match - Several Jumper wires 2. Now we connect the flame sensor to micro:bit.
www.adeept.com 3. Experimental code: Lesson 17 Flame sensor module->code-> microbit-Flame_module.hex Lesson 17 Flame sensor module->code-> Flame_module.py 4. Click “flash” and download the code onto the micro:bit. The flame sensor, as its name suggests, is most sensitive to the flame, of course, it also responds to ordinary light. We can see the changes of data clearly on the serial monitor when we put the flame of the lighter close to the flame sensor.
www.adeept.com Lesson 18 Potentiometer Introduction In this lesson, let’s learn how to use the potentiometer. What is potentiometer? The potentiometer is actually a variable resistor with three lead-out segments. The potentiometer is usually composed of a resistor body and a movable brush. When the brush moves along the resistor body, a resistance value or voltage that has a certain relationship with the displacement amount is obtained at the output end.
www.adeept.com - Several Jumper wires 2. Now we connect the potentiometer to the micro:bit. connection diagram: 3. Experimental code: Lesson 18 Potentiomenter->code-> microbit-Potentiomenter-module.hex Lesson 18 Potentiomenter->code-> Potentiometer.py 4. Click “flash” and download the code onto the micro:bit.
www.adeept.com When we rotate the potentiometer, we can see the changes of the potentiometer analog value on the simulator. Effect Picture: Summary: Through this lesson, I believe you have known about the potentiometer and how to make the initial use of it.
www.adeept.com Lesson 19 Servo Introduction In this lesson, let’s know something about the rotation angle of the servo. What is servo: The servo motor has three wires: power, ground, and signal. The power wire is typically red, and should be connected to the 3.3V pin on the Microbit board. The ground wire is typically black or brown and should be connected to a ground pin on the Microbit board.
www.adeept.com 3. Experimental code: Lesson 19 Servo->code-> microbit-Servo.hex Lesson 19 Servo->code-> servo.py 4. Click “flash” and download the code onto the micro:bit. Now you can see that the servo is starting up at 30 degrees and then rotate uninterruptedly from 90 to 180 degrees.
www.adeept.com Summary: Through this lesson, I believe that you have learned how to control the servo by micro:bit. Hope you can let your imagination run wild to do more interesting experiments.
www.adeept.com Lesson 20 Potentiometer control Servo Introduction In this lesson, let’s learn how to control servo by potentiometer. Operating steps 1. First, we need to prepare the following experimental materials: 1 * microbit 1 * microbit expansion board 1 * USB cable 1 * Potentiomenter 1 * Servo - Several Jumper wires 2. Connect the potentiometer and servo to micro:bit.
www.adeept.com 3. Experimental code: Lesson 20 Potentiomenter control Servo->code->microbit-Pot_servo.hex Lesson 20 Potentiomenter control Servo->code-> Pot_servo.py 4. Click “flash” and download the code onto the micro:bit.
www.adeept.com Summary: Through the study of this lesson, I believe that you have mastered how to use the potentiometer to control the angle of the servo. Hope that you can draw the inferences and combine experiments with different components to enhance your ability of operation.
www.adeept.com Lesson 21 Accelerate control servo Introduction In this lesson, let’s learn to control the servo with micro:bit. What is Accelerometer? Operating steps 1. First, we need to prepare the following experimental materials: 1 * microbit 1 * Adeept microbit expansion board 1 * USB cable 1 * Servo - Several Jumper wires 2. Connect the servo with micro:bit.
www.adeept.com 3. Experimental code: Lesson 21 Accelerate control servo->code->microbit-Acceleration.hex 4. Click “flash” and download the code onto the micro:bit. Now it can be seen that as long as the micro:bit board is rotated, the angle of the servo will change accordingly.
www.adeept.
www.adeept.com Summary: Through this lesson, I believe that you have already had a preliminary understanding of the accelerometer of the micro:bit. And we will take you to do more interesting experiments later.
www.adeept.com Lesson 22 CM+Soil Moisture sensor Introduction In this lesson, let’s learn about the use of the soil moisture sensor. What is Soil Moisture sensor? The Soil Moisture Sensor module is a simple sensor that measures the soil moisture. When the soil moisture is insufficient, the output value of the sensor will decrease; on the other hand, the value will increase when there’s enough water. The surface of the sensor is gilded to prolong its life.
www.adeept.com - GND + 3.3V Operating steps 1. First, we need to prepare the following experimental materials: 1 * microbit 1 * microbit expansion board 1 * USB cable 1 * CM Module 1 * Soil Moisture sensor - Several Jumper wires 2. Connect the comparator and soil moisture sensor with micro:bit.
www.adeept.com 3. Experimental code: Lesson 22 CM+Soil Moisture sensor->code-> microbit-soil-moisturesensor.hex Lesson 22 CM+Soil Moisture sensor->code-> Soil_moisture sensor.py 4. Click “Download” and download the code onto the micro:bit. When we insert the moisture sensor into the soil, we can see the changes of the soil moisture on the serial port.
www.adeept.
www.adeept.com Lesson 23 CM+Water level sensor module Introduction In this lesson, let’s learn about the use of the water level sensor. The module is a simple water level sensor. It measures the water volume by the printed wires exposed to the air on the module. The more water on the surface, more wires connected. Thus, the area of electrified wires gets larger, so the output voltage will increase. The surface of the sensor is gilded to prolong its life.
www.adeept.com Operating steps 1. First, we need to prepare the following experimental materials: 1 * microbit 1 * microbit expansion board 1 * USB cable 1 * CM module 1 * water level sensor module - Several Jumper wires 2. Now connect the water level sensor to one end of the comparator whose the other end is connected to micro:bit.
www.adeept.com 3. Experimental code: Lesson 23 CM+Water level sensor module->code-> microbit-waterlevelmodule.hex Lesson 23 CM+Water level sensor module->code-> waterlevels sensor.py 4. Click “flash” and download the code onto the micro:bit. Now you can see the value shown on the serial port. When the water level sensor is placed in the water, the lower it is placed, the higher the value is read.
www.adeept.com Summary: Through this lesson, you have already known how to use the water level sensor. Combined with the lesson about the buzzer previously, you can do an expanding experiment and make a water level alarm.
www.adeept.com Lesson 24 Line Finder module Introduction In this lesson, let’s learn about the line finder module. This module, as its name suggests, is used on the line finding of cars. Line Finder Module: The Line Finder Module applies the principle that infrared rays reflect differently on surfaces of different colors. After electrified, the infrared diode on the module sends out infrared rays constantly.
www.adeept.com Operating steps 1. First, we need to prepare the following experimental materials: 1 * microbit 1 * microbit expansion board 1 * USB cable 1 * line finder module 1 * white paper stick with black tape. - Several Jumper wires 2. Connect the line finder module to micro:bit.
www.adeept.com 3. Experimental code: Lesson 24 Line Finder module->code-> microbit-Line_finder.hex Lesson 24 Line Finder module->code-> Line_finder.py 4. Click “flash” and download the code onto the micro:bit. Now you can see the data read from the infrared line finder module on the serial port.
www.adeept.com Summary: Through this lesson, I believe that you have learned the use of the infrared line finding sensor. And after learning to control the motor with micro:bit, you can make a tracing car yourself.
www.adeept.com Lesson 25 Silde Potentiomenter module Introduction In this lesson, let’s learn about the use of the slide potentiometer. What is slide potentiometer? The similarity of the Slide Potentiometer Module and Potentiometer Module lies in: holding three terminals; changing the resistance between the changeable terminal and one end by changing the position of the slider.
www.adeept.com connection diagram: 3. Experimental code: Lesson 25 Silde Potentiomenter module->code-> microbitSlide_potentiomenter.hex Lesson 25 Silde Potentiomenter module->code-> Slide potentiometer.py 4. Click “flash” and download the code onto the micro:bit. Now we can see the data changes of the slide potentiometer.
www.adeept.com Summary: Through this lesson, I believe you have known how to use the slide potentiometer. In fact, it functions similarly with potentiometer.
www.adeept.com Lesson 26 LCD1602 display Introduction In this lesson, we will study the LCD1602 and use the IIC interface module for drive display. What is LCD1602: 1602 crystal is also called 1602 character crystal. 1602 LCD means that the display content is 16X2, that is, it can display two lines, each line of 16 characters LCD module, it is a kind of dot matrix type specially used to display letters, numbers, symbols, etc.
www.adeept.com LCD 1602: VSS GND VDD 3.3V V0 Analog input RS Digital input RW Digital input E Digital input D0 Digital input D1 Digital input D2 Digital input D3 Digital input D4 Digital input D5 Digital input D6 Digital input D7 Digital input A 3.3V K GND What is IIC interface? The IO ports of the micro: bit is limited. We need a lot of ports if we want to directly drive the LCD1602. But there may be not enough ports to connect other sensors.
www.adeept.com PCF8574 pin information IIC communication protocol Two bus lines, one data line SDA and one clock line SCL. The IIC bus has three types of signals in the process of transmitting data: start signal, end signal, and response signal. Start signal: When SCL is high, SDA transfers from high level to low level and starts transmitting data. End signal: When SCL is high, SDA transfers from low level to high level and ends transmitting data.
www.adeept.com Response signal: After receiving the 8-bit data, the receiving IC sends a specific low-level pulse to the sending IC, indicating that the data has been received. After the CPU sends a signal to the controlled unit, it waits for the controlled unit to send a response signal. After receiving the response signal, the CPU makes a judgment as to whether to continue transmitting the signal according to the actual situation.
www.adeept.com 1 * microbit 1 * microbit expansion board 1 * USB cable 1 * IIC interface module 1 * lcd 1602 - Several Jumper wires 2. First connect the IIC interface module to the LCD1602, then connect it to the micro:bit with a jumper wire. connection diagram: Experimental code: Lesson 26 LCD1602 display->code->LCD_1602.py 3. Click “flash” and download the code onto the micro:bit. We can see that the LCD1602 displays the text set in the codes.
www.adeept.com Summary: Through this lesson, I believe that you have already known the use of the IIC interface module and the LCD 1602. Besides displaying text, the LCD1602 can also display the values read by the sensors we have mentioned before.
www.adeept.com Lesson 27 PS2 joystick Introduction In this lesson, let’s learn to use PS2 joystick. What is PS2 joystick? The PS2 Joystick Module is an input device. It consists of a station and the control knobonside. It functions by sending angle or direction signals to the device controlled. The button on the module can also be recognized by the microcontroller.
www.adeept.com Operating steps 1. First, we need to prepare the following experimental materials: 1 * microbit 1 * microbit expansion board 1 * USB cable 1 * PS2 joystick - Several Jumper wires 2. Now connect the PS2 joystick to micro:bit.
www.adeept.com 3. Experimental code: Lesson 27 PS2 joystick->code->microbit-PS2_joystick.hex Lesson 27 PS2 joystick->code-> ps2_val.py 4. Click “flash” and download the code onto the micro:bit. Effect Picture: Summary: I believe that you have had a certain understanding of PS2 joytick after this lesson.
www.adeept.com Lesson 28 DC motor fan Introduction In this lesson, let’s make a DC motor fan Adeept DC motor fan: Here we use L9110 chip L9110: L9110 is a driver chip which is used to control and drive motor. The chip has two TTL/CMOS compatible input terminals, and possesses the property of anti-interference: it has high current driving capability, two output terminals that can directly drive DC motor, each output port can provide 750~800mA dynamic current, and its peak current can reach 1.5~2.
www.adeept.com A DC motor is any of a class of electrical machines that converts direct current electrical power into mechanical power. The most common types rely on the forces produced by magnetic fields. Nearly all types of DC motors have some internal mechanism, either electromechanical or electronic, to periodically change the direction of current flow in part of the motor. Most types produce rotary motion; a linear motor directly produces force and motion in a straight line.
www.adeept.com 1 * microbit expansion board 1 * USB cable 1 * Adeept motor fan - Several Jumper wires 2. Now connect the Adeept DC motor fan module to micro:bit. connection diagram: Adeept microbit DC motor Module Pin1 B Pin0 A 3.
www.adeept.com 3. Experimental code: Lesson 28 DC motor fan->code-> microbit-Motor-fan.hex Lesson 28 DC motor fan->code-> DC_fan.py 4. Click “flash” and download the code onto the micro:bit. When the button A is pressed, the DC motor fan blows outwards counterclockwise, and when the button B is pressed, the DC motor fan blows clockwise.
www.adeept.com Summary: You have learned how to control the motor rotation through micro:bit after this lesson. Try to apply the knowledge to create more, such as making a car of micro:bit.
www.adeept.com Lesson 29 Flame arrester Introduction In this lesson, let’s make a flame arrester based on the previous knowledge we’ve learned. Experiment target Put the lighter close to the flame sensor, the DC motor fan will start and extinguish the fire after the sensor detect the flame. Operating steps 1.
www.adeept.com 3. Experimental code: Lesson 29 Flame arrester->code-> microbit-Fire_arrester.hex Lesson 29 Flame arrester->code-> Fire_arrester.py 4. Click “flash” and download the code onto the micro:bit.
www.adeept.com Summary: Now you have known how to make a flame arrester. Hope you can do more interesting experiments with what you have learned.
www.adeept.com Lesson 30 Rotary encoder Introduction In this lesson, let’s learn about the rotary encoder. What is rotary encoder? Rotary incremental encoder outputs pulse when rotating and locates it by counting equipment, when the encoder stop or the power is off, it remembers the location by the inside memory of counting equipment.
www.adeept.com 1 * Rotary encoder - Several Jumper wires 2. Now connect the rotary encoder to micro:bit.
www.adeept.com 3. Experimental code: Lesson 30 Rotary encoder->code->Rotary_encoder.py 4. Click “flash” and download the code onto the micro:bit. Now you can see that when we rotate the rotary encoder clockwise and counterclockwise, we can see the corresponding content display on the matrix LED. Effect Picture: Summary: Through this lesson, I believe that you have had a certain understanding of the working principle and operation mode of the rotary encoder.
www.adeept.com Lesson 31 Ultrasonic module Introduction In this lesson, let’s learn about the ultrasonic module. Ultrasonic module Trig sending end Echo receiving end VCC 3.3V GND GND This recipe uses the popular Parallax PING ultrasonic distance sensor to measure the distance of an object ranging from 2 cm to around 3 m. Ultrasonic sensors provide a measurement of the time it takes for sound to bounce off an object and return to the sensor.
www.adeept.com Operating steps 1. First, we need to prepare the following experimental materials: 1 * microbit 1 * microbit expansion board 1 * USB cable 1 * Ultrasonic sensor module - Several Jumper wires 2. Now connect ultrasonic module to micro:bit.
www.adeept.com 3. Experimental code: Lesson 31 Ultrasonic module->code-> microbit-ultrasonic-HC-SR04.hex Lesson 31 Ultrasonic module->code->Ultrasonic.py 4. Click “flash” and download the code onto the micro:bit. We can see the data fed back by the ultrasonic module on the serial port.
www.adeept.com Summary: Through this lesson, you have had a preliminary understanding of the working principle of the ultrasonic module. Ultrasound is widely used in our life. You can try to make other expansion experiments if you’re interested.
www.adeept.com Lesson 32 Ultrasonic control LED modules Introduction In this lesson, let’s learn to control three LEDs with ultrasonic. Experiment purpose: We learned ultrasonic ranging in the previous lessons, and here we make an expansion. Operating steps 1. First, we need to prepare the following experimental materials: 1 * microbit 1 * microbit expansion board 1 * USB cable 1 * Ultrasonic module 3 * led module - Several Jumper wires 2.
www.adeept.com 3. Experimental code: Lesson 32 Ultrasonic control led modules->code->microbit-UltrasonicLED.hex Lesson 32 Ultrasonic control led modules->code->Ultrasonic_control_led.py 4. Click “flash” and download the code onto the micro:bit. Now we can see that the LEDs change in different colors when the ultrasonic sense obstacles at different distances.
www.adeept.com Lesson 33 Ultrasonic control DC motor Introduction In this lesson, let’s learn to control the rotational speed with ultrasonic. Operating steps 1. First, we need to prepare the following experimental materials: 1 * microbit 1 * microbit expansion board 1 * USB cable 1 * ultrasonic module 1 * Motor fan module - Several Jumper wires 2. Now connect the ultrasonic module and the DC motor module to micro:bit.
www.adeept.com 3. Experimental code: Lesson 33 Ultrasonic control DC motor->code->microbit-Ultrasonic+DCmotor.hex Lesson 33 Ultrasonic control DC motor->code->Ultrasonic_control_DC motor.py 4. Click “flash” and download the code onto the micro: bit The closer the obstacle is detected by the ultrasonic, the slower the rotational speed is.
www.adeept.com Lesson 34 Ultrasonic control RGB bar Introduction In this lesson, let’s learn to control the RGB LED bar with ultrasonic. Operating steps 1. First, we need to prepare the following experimental materials: 1 * microbit 1 * microbit expansion board 1 * USB cable 1 * ultrasonic module 1 * RGB LED bar - Several Jumper wires 2. Now connect the ultrasonic module and RGB LED bar to micro:bit.
www.adeept.com 3. Experimental code: Lesson 34 Ultrasonic control RGB bar->code-> microbit-Ultrasonic+RGBbar.hex Lesson 34 Ultrasonic control RGB bar->code->Ultrasonic_control_rgb.py 4. Click “flash” and download the code onto the micro:bit. Now we can see that the LEDs change in different colors when the ultrasonic sense obstacles at different distances.