{"product_id":"rgb-led-for-micro-bit","title":"RGB LED for micro:bit","description":"\u003cp\u003eThe MonkMakes RGB LED for micro:bit provides a colourful 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 colour of light you want.\u003c\/p\u003e\n\u003ch2\u003eFeatures\u003c\/h2\u003e\n\u003cul\u003e\n\u003cli\u003eEasy to connect\u003c\/li\u003e\n\u003cli\u003ePowered directly from micro:bit pins\u003c\/li\u003e\n\u003cli\u003eUseful for teaching color mixing.\u003c\/li\u003e\n\u003cli\u003eCompatible with micro:bit v1 and v2!\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003ch2\u003eGetting Started\u003c\/h2\u003e\n\u003cp\u003e\u003cstrong\u003eConnecting to your micro:bit\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003eConnect 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.\u003c\/p\u003e\n\u003cimg alt=\"\" src=\"\/\/cdn.shopify.com\/s\/files\/1\/0174\/1800\/files\/wiring-467x1024_large.png?v=1525793442\" style=\"float: none;\"\u003e\n\u003ch2\u003eJavaScript Blocks Editor\u003c\/h2\u003e\n\u003cp\u003e\u003cstrong\u003eTraffic Signal Example\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003eClick 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.\u003c\/p\u003e\n\u003cp\u003e\u003ca href=\"https:\/\/makecode.microbit.org\/_CP1fvqCCR6CK\" target=\"_blank\"\u003e\u003cimg src=\"\/\/cdn.shopify.com\/s\/files\/1\/0174\/1800\/files\/traffic_code-1024x801_large.png?v=1525793497\" alt=\"\"\u003e\u003c\/a\u003e\u003c\/p\u003e\n\u003ch2\u003eMicroPython\u003c\/h2\u003e\n\u003cp\u003e\u003cstrong\u003eTRAFFIC SIGNAL EXAMPLE\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003ePaste the following code into the \u003ca href=\"http:\/\/python.microbit.org\/editor.html\" target=\"_blank\"\u003ePython window\u003c\/a\u003e and then Download the file and copy it onto your your micro:bit\u003c\/p\u003e\n\u003cp\u003e\u003ccode\u003efrom microbit import *\u003cbr\u003e\u003cbr\u003edef set_rgb(red, green, blue):\u003cbr\u003e pin0.write_analog(red)\u003cbr\u003e pin1.write_analog(green)\u003cbr\u003e pin2.write_analog(blue)\u003cbr\u003e\u003cbr\u003ewhile True:\u003cbr\u003e set_rgb(255, 0, 0)\u003cbr\u003e sleep(4000)\u003cbr\u003e set_rgb(800, 100, 0)\u003cbr\u003e sleep(1000)\u003cbr\u003e set_rgb(0, 1023, 0)\u003cbr\u003e sleep(5000)\u003cbr\u003e set_rgb(800, 100, 0)\u003cbr\u003e sleep(1000)\u003c\/code\u003e\u003c\/p\u003e","brand":"Monk Makes","offers":[{"title":"Default Title","offer_id":3108766318602,"sku":"MNK00064","price":3.95,"currency_code":"EUR","in_stock":false}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0174\/1800\/products\/RGB_LED_9f6c9283-512e-4f3b-a972-037f98bdbdc9.JPG?v=1530983801","url":"https:\/\/shop.pimoroni.com\/en-eu\/products\/rgb-led-for-micro-bit","provider":"Pimoroni Ltd","version":"1.0","type":"link"}