Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 19

module 2A:

Lighting Neopixel

In this module, students will learn:


 What are RGB LEDs
 What are Neopixels
 How to program Neopixels
What is a RGB LED?
• RGB LED is a LED that has 3 color LED
inside it (Red, Green, Blue). It can
produce over 16 million hues of light.

Mio Jr. M2A 2


How LED works
• The LED lights up if we connect power to the
positive part and ground to the negative part.
The charges in the positive and negative part
will combined to create a photon (light
power).

Mio Jr. M2A 3


How rgb LED works
• The RGB LED works the same as LEDs, but the
unique in RGB LED is you can set the power to the
respective color. If we put 0 power to red and blue
and we put 5V to green then we get green color.

Mio Jr. M2A 4


What is neopixel
• These are individually LEDs or RGB LEDs all
housed on a string that can be controlled from a
single pin or a single power.

Mio Jr. M2A 5


What is neopixel

Mio Jr. M2A 6


Recall: How to connect mio jr. to your
pc
• First get your USB to Mini USB cable and plug it to the
Microcontroller (it can reattach to your Mio Jr.).

You should see this in


your PC. MATRIXBIT

Mio Jr. M2A 7


Recall: Makecode
1. Go to makecode.microbit.org
2. Click New project
3. Program and make your codes

Mio Jr. M2A 8


Recall: Makecode
4. Go to Settings and click Extensions.
5. Put in the search tab https://github.com/onion3/Zero
6. Press enter and click the extension showed up.

Mio Jr. M2A 9


Recall: Makecode

Mio Jr. M2A 10


Recall: Makecode
After you click it, it will download into your
workplace and this new menus will be added.

New added menus

Mio Jr. M2A 11


Recall: Makecode
After you code click save then put the download
file into your microcontroller’s folder.

Click this
Find where you
download it then copy
and paste your hex file
to the Matrixbit (G:)

Mio Jr. M2A 12


programming blocks
Programming Function

Run your program just only


once

Run your program repeatedly

Mio Jr. M2A 13


programming blocks
Programming Function

Set your setup for


Neopixels

Allow you to setup your


Neopixels properties

Allow you to light the


desired color

Mio Jr. M2A 14


Exercise # 1
Instruction: Light up your Mio Jr. with any
2 colors.

Mio Jr. M2A 15


Exercise # 1
Solution:

Mio Jr. M2A 16


Activity # 1
Instruction: Light up your Mio Jr. with
rainbow colors.

Mio Jr. M2A 17


Activity # 1
Solution:

Mio Jr. M2A 18


GET EXCITED FOR THE NEXT
ONE!

In this module, students will learn:


 How to use delay blocks
 How to blink lights
 How to program and execute it
Mio Jr. M2A 19

You might also like