In this session of TechnoClub we experiment with light, colour, and 3D modelling.
To wire up an RGB LED we need:
The first pin of the LED going to pin 3 (~) on the Arduino.
The second pin of the LED going to a resistor.
That resistor then connects to GND.
The third pin of the LED going to pin 6 (~).
The fourth pin of the LED going to pin 5 (~).
The code is a very simple block found in the Output panel.
For this section, rather than wire up anything ourselves we're going to do the following:
Click on the Components drop-down menu.
Select Arduino (found in the Starters section).
Find the NeoPixel preset and drag it into the design area.
Click Code.
Edit the code you see to change any mention of random(0,255) to any number between 0 and 255.
This is the preset NeoPixel circuit.
Changing the green numbers here to anything between 0 and 255 will give a different colour.