elecena.pl

RGB LED for micro:bit

The Pi Hut

RGB LED for micro:bit RSS 3.60 3.60 GBP18.62 PLN
  • Sklep zagraniczny
Kod:
MNK00064
Producent:
Monk Makes
Waluta:
funt szterling
Dodany do bazy:
Ostatnio widziany:
Zmiana ceny:
+25% (30.11.2024)
Poprzednia cena:
2.88 GBP

The MonkMakes RGB LED for micro:bit provides a colorful add-on to your micro:bit. Connect it up with alligator clips and then use the three outputs of your micro:bit to control the red, green and blue channels to mix up any color of light you want. Features

* Easy to connect

* Powered directly from micro:bit pins

* Useful for teaching color mixing.

Getting Started Connecting to your micro:bit Connect the RGB LED to the micro:bit as shown below. When attaching the alligator clips to the micro:bit, make sure that the clips are perpendicular to the board so that they are not touching any of the neighbouring connectors on the micro:bit edge connector.

JavaScript Blocks Editor Traffic Signal Example Click on the example below to open the code in the JavaScript Blocks Editor. Once its running on your micro:bit it will cycle through the colors of a traffic signal.

MicroPython TRAFFIC SIGNAL EXAMPLE Paste the following code into the Python window and then Download the file and copy it onto your your micro:bit from microbit import *

def setrgb(red, green, blue): pin0.writeanalog(red) pin1.writeanalog(green) pin2.writeanalog(blue)

while True: setrgb(255, 0, 0) sleep(4000) setrgb(800, 100, 0) sleep(1000) setrgb(0, 1023, 0) sleep(5000) setrgb(800, 100, 0) sleep(1000)

Elecena nie prowadzi sprzedaży elementów elektronicznych, ani w niej nie pośredniczy.

Produkt pochodzi z oferty sklepu