How To Use Infrared Remote Control on StemBit

How To Use Infrared Remote Control on StemBit

Note

  1. You must face the Infrared Remote Controller towards the micro:bit Expansion Board Infrared receiver.
  2. If you want to use it as normal then you’ve to take down the plastic piece which is in bottom of the Infrared remote Controller.
  3. The infrared light emitted by the infrared remote controller and the infrared receiver is invisible to the human eye. It can be seen under the camera without filtering infrared light. 

 Step 1

First you need the download the program of Stembit (https://github.com/sbcshop/pxt-stembit-remote) , Then open the power button of IR Car and press the button of the infrared remote controller. The IR Car will have respond by action. On the Infrared remote controller, small light button, add button, subtract button to control the color of the colorful lights, the red power button to turn off light, 1~7 button represents the music do, re, mi, fa, sol, la, si. The front, back, left and right buttons control the advance, back, turn left and turn right of the car, the spin left button and spin right button control the car to rotate left and rotate right. 0 and 8, 9 are used to control the image of the dot matrix screen.

Step 2

StemBit IR Car*1

Infrared remote controller*1

USB data cable*1

StemBit Programming methods

Online programming:

First, we need to connect the micro:bit to the computer by USB data cable, the computer will pop up a USB flash drive. Then, click on the URL in the USB flash drive: http://microbit.org/ to enter the edit process interface, click to 【Extensions】, and copy the package URL: https://github.com/sbcshop/pxt-stembit to the input field, and you can use the building blocks of the StemBit software package.

Offline programming:

Click to 【Extension】 and copy the package URL: https://github.com/sbcshop/pxt-stembit to the input field and you can use the building blocks of the StemBit software package.

Step 3

Studying blocks

Blocks

Instructions

StemBit Programming

Executed at Boot time, the code is executed once.

 

How to Use IR Remote Control

Display image in the lattice of the micro:bit

 

Using IR on Microbit car

If true then Execute.

If it is false, it will not be executed.

 

Using IR on Microbit car

If there is an obstacle in front,

Then the car will back, otherwise the car will move forward.

 

StemBit IR Car

The program pause 100 milliseconds and the time can be modified yourself.

 

Microbit IR Car

When the power button on the remote controller is pressed, the code inside will be executed, and the button can be customised.

 

IR car for microbit

Set the infrared remote control receiving pin. In this experiment, the receiving pin is P8, so you must select P8, Otherwise you will not receive the signal.

The above is the program for this StemBit IR Car. After writing, we need to download it to the micro:bit board.

 

RELATED ARTICLES

Leave a comment

Your email address will not be published. Required fields are marked *

Please note, comments must be approved before they are published