{"product_id":"rgb-led-for-microbit","title":"RGB LED for micro:bit","description":"\u003cp\u003eThe 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.\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\u003c\/ul\u003e\n\u003ch2\u003eGetting Started\u003c\/h2\u003e\n\u003ch3\u003eConnecting to your micro:bit\u003c\/h3\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\u003cp\u003e\u003cimg src=\"\/\/cdn.shopify.com\/s\/files\/1\/0176\/3274\/files\/wiring-467x1024_large.png?v=1523265419\" alt=\"\"\u003e\u003c\/p\u003e\n\u003ch3\u003e\u003c\/h3\u003e\n\u003ch3\u003eJavaScript Blocks Editor\u003c\/h3\u003e\n\u003ch3\u003eTraffic Signal Example\u003c\/h3\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\u003cimg src=\"\/\/cdn.shopify.com\/s\/files\/1\/0176\/3274\/files\/traffic_code-1024x801_large.png?v=1523265428\" alt=\"\"\u003e\u003c\/p\u003e\n\u003ch3\u003e\u003c\/h3\u003e\n\u003ch3\u003eMicroPython\u003c\/h3\u003e\n\u003ch3\u003eTRAFFIC SIGNAL EXAMPLE\u003c\/h3\u003e\n\u003cp\u003ePaste the following code into the Python window and then Download the file and copy it onto your your micro:bit\u003c\/p\u003e\n\u003cpre class=\"language-python code-toolbar\"\u003e\u003ccode class=\" language-python\"\u003efrom microbit import *\n\ndef set_rgb(red, green, blue):\n pin0.write_analog(red)\n pin1.write_analog(green)\n pin2.write_analog(blue)\n\nwhile True:\n set_rgb(255, 0, 0)\n sleep(4000)\n set_rgb(800, 100, 0)\n sleep(1000)\n set_rgb(0, 1023, 0)\n sleep(5000)\n set_rgb(800, 100, 0)\n sleep(1000) \u003c\/code\u003e\u003c\/pre\u003e","brand":"Monk Makes","offers":[{"title":"Default Title","offer_id":46039323017276,"sku":"ygj1787257885798","price":2.96,"currency_code":"USD","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0676\/6985\/2220\/files\/rgb-led-for-microbit_1.jpg?v=1787257894","url":"https:\/\/luxecladstore.shop\/products\/rgb-led-for-microbit","provider":"My Store","version":"1.0","type":"link"}