Clone this repository and change/move into the cloned directory in your terminal window.
Prepare the micro:bit V2 and Kitronik Edge Connector Breakout Board:Attach the Kitronik Edge Connector Breakout Board to the micro:bit V2. Make sure the connectors are facing each other and that the pins are aligned.
Connect 3 of the 560R resistors to the breadboard so that the resistors can be shared by the RGB LED.
Insert one end of each resistor into the following holes on the breadboard:
Connect the 3 other ends of the 560R resistors to the breadboard in respective order to match the first insertion instructions above.
These must be placed across the gap of the breadboard (the other side).
Connect the female end of the jumper wire to the anode terminals (Red, Green, Blue) of the LED using Red, Green, and Blue M/F 6" Jumper Wires. These are the three shorter ends (anode terminals) of the RGB LED legs for common cathode RGB LEDS. The word common indicates that this will be the connection to the ground pin (0V). Manufacturers also make commmon anode LEDS, but that's not what were using here for this example.
The anodes are the positive (+) terminals of the component. For an RGB LED, the anode terminals the longer legs and are connected to the positive side of the power source. You might be wondering, how do test which anode lights up which color of the RGB Led - Red, Green, or Blue. We take care of that in the final step, step 13. For now, just follow the instructions as they are written.
You'll now have 3 M/F Jumper Wires now with the male ends available. Connect the male end to the breadboard on same hole in the same line just AFTER each resistor for each anode (Red, Green, Blue), respectively.
This is how you match up the holes from the second part of step 2 (the other end of the resistor placed across the gap) to the male ends of the Jumper Wires.
You'll now get 3 M/F Jumper wires. Using those, connect the male end to the breadboard on the hole in the same line just BEFORE each resistor for each Anode (Red, Green, Blue), respectively.
You'll now have 3 Female ends to insert into the Kitronik Edge Connector Breakout Board.
Connect the Female end of the Jumper connected to the Red LED cable to the Kitronik Edge Connector Breakout Board, onto Pin 9 of the Kitronik Breakout Board Edge Connector.
For example, in the code:
//Pin 9 on Breakout Board
let mut red_led = gpio.p0_09.into_push_pull_output(Level::Low);
//Pin 3 on Breakout Board
let mut green_led = gpio.p0_31.into_push_pull_output(Level::Low);
//Pin 4 on Breakout Board
let mut blue_led = gpio.p0_28.into_push_pull_output(Level::Low);
This would indicate that the red_led variable has been assigned to Pin 9 on the Kitronik Edge Connector Breakout Board.
Connect the Female end of the Jumper connected to the Green LED cable to the Kitronik Edge Connector Breakout Board, onto Pin 3 of the Kitronik Breakout Board Edge Connector.
Connect the Female end of the Jumper connected to the Blue LED cable to the Kitronik Edge Connector Breakout Board, onto Pin 4 of the Kitronik Breakout Board Edge Connector.
Connect a black F/F Jumper Wire, one female end, to the common cathode pin of the RGB LED (the shorter leg terminal).
Insert the other female end of the Jumper wire into the Kitronik Breakout Board Edge Connector, to one of the 0V pins (Ground pin).
Connect the micro:bit V2 to your computer using the micro-USB to USB-A cable.
Build and Flash your micro:bit V2:
Run this command from the root cloned directory:
If you have problems with this, check out the Rust Discovery Book:
Then run this command from the root cloned directory:
If you have problems with this, check out the Rust Discovery Book:
The red LED, green LED, and blue LED should all light up respectively with 250 millsecond rotations.
You can now test which anode terminal of your RGB LED is red, green, and blue by pulling out 2 of the 3 female Jumper Wires for the anode pins (the longer legs). You can then reconnect the cables in a color coded fashion.
Does your RGB LED alternate colors every 250 millseconds?