PROGRAMMING SCHOOL
Programming micro:bit in Python (Mu)
1. STEP MOTOR8. LIGHT CONTROLL - POTO sensor (DIGITALLY) B
2. ENCODER MOTOR - COUNTER CONTROL9. LIGHT CONTROLL - POTO sensor (DIGITALLY) 2
3. Controling LEDs with Potentiometer10. LIGHT CONTROLL - POTO sensor (DIGITALLY)
4. MOTOR - ROTATION CONTROL WITH BUTTONS "A" AND "B"11. LIGHT CONTROLL - PUSH BUTTON (DIGITALNO)
5. COLOR SENZOR (FischerTechnik) - COLOR recognition12. TWO LIGHTS CONTROLL WITH BUTTONS A AND B
6. LIGHT CONTROLL - POTO sensor (ANALOGUE) - RECOGNIZING BLACK LINE13. TWO LIGHTS CONTROLL
7. LIGHT CONNTROL - POTO sensor (ANALOGUE)14. LIGHT / LED CONTROLL

STEP MOTORTOP
***20***
spajanje20_mb.jpg

Example of stepper motor control in FULL step mode and HALF step mode. The speed is adjusted with the delay command. For this example, we used a motor that runs at 5V and supports a maximum of 180 steps for full speed. A step counter should be placed in the program for accurate control. Stepper motors are big consumers and care should be taken not to draw too much electricity as the drivers will get very hot. We use a voltage of 5V to power the F5 board and micro:bit.

ENCODER MOTOR - COUNTER CONTROLTOP
***19***
spajanje19_mb.jpg

Connect encoder motor to OUTPUT for motor M1 (P15 and P16). Counter supply ( green and red wire ) connect to 5V output. Signal wire connect to INPUT P1.

Controling LEDs with PotentiometerTOP
***13***
spajanje13_mb.jpg

Turning the potentiometer turns on the LEDs. The potentiometer is connected to INPUT P0 and reads analogously. The interface is powered by a universal 5V adapter.

MOTOR - ROTATION CONTROL WITH BUTTONS "A" AND "B"TOP
***11***
spajanje11_mb.jpg

Connect motor on OUTPUTS 1 i 2 (P16 i P15).

COLOR SENZOR (FischerTechnik) - COLOR recognitionTOP
***10***
spajanje10_mb.jpg

Connect the RED light to OUT 1 (P16), GREEN to OUTPUT 2 (P15), ON to OUT 3 (P14), and COLOR sensor to input 1 (P1). Connect the sensor power to the BATTERY connector (9V). Use the analogue reading of the input value in the program. Set the program's operation according to the Input Readings for color matching.

LIGHT CONTROLL - POTO sensor (ANALOGUE) - RECOGNIZING BLACK LINETOP
***09***
spajanje09_mb.jpg

Connect the RED lamp to OUT 1 (P16), and the PHOTO sensor to input 1 (P1). Use the analogue reading of the input value in the program.

LIGHT CONNTROL - POTO sensor (ANALOGUE)TOP
***08***
spajanje08_mb.jpg

Connect the RED lamp to OUT 1 (P16), and the PHOTO sensor to input 1 (P1). Use the analogue reading of the input value in the program.

LIGHT CONTROLL - POTO sensor (DIGITALLY) BTOP
***07***
spajanje07_mb.jpg

Connect the RED lamp to OUT 1 (P16), and the PHOTO sensor to input 1 (P1). Use the analogue reading of the input value in the program.

LIGHT CONTROLL - POTO sensor (DIGITALLY) 2TOP
***06***
spajanje06_mb.jpg

Connect the RED lamp to OUT 1 (P16), and the PHOTO sensor to input 1 (P1). Use the analogue reading of the input value in the program.

LIGHT CONTROLL - POTO sensor (DIGITALLY)TOP
***05***
spajanje05_mb.jpg

Connect the RED lamp to OUT 1 (P16), and the PHOTO sensor to input 1 (P1). Use the analogue reading of the input value in the program.

LIGHT CONTROLL - PUSH BUTTON (DIGITALNO)TOP
***04***
spajanje04_mb.jpg

Connect the RED lamp to OUT 1 (P16), and PUSH BUTTON to the input 1 (P1).

TWO LIGHTS CONTROLL WITH BUTTONS A AND BTOP
***03***
spajanje03_mb.jpg

Connect the RED lamp to OUT 1 (P16), and GREEN to OUTPUT 2 (P15).

TWO LIGHTS CONTROLLTOP
***02***
spajanje02_mb.jpg

Connect the RED lamp to OUT 1 (P16), and GREEN to OUTPUT 2 (P15).

LIGHT / LED CONTROLLTOP
***01***
spajanje01_mb.jpg

Connect the light to OUT 1 (P16).