The github repo for HCID521 - Prototyping Studio Winter 2019
Blink.ino
Turns on and off Pin 3 once a second
BlinkWithSerialPrint.ino
Turns on and off Pin 3 and shows how to use Serial.print to print values to the Serial Monitor
Blink2.ino
Demonstrates two configurations of activating LEDs. One where the LED anode (long leg) is pointed towards an output pin (in this case, Pin 3). In this configuration, driving Pin 3 HIGH will turn on the LED. And the second where the LED anode is connected to 5V and the cathode is connected towards Pin 4. In this configuration, driving Pin 4 HIGH will turn off the LED. See lecture slides for details.
FadeOneDirection.ino
This example shows how to fade an LED on Pin 3 using the analogWrite()
function. The fade goes in one direction (from off to a fade on) and then repeats (off to fade on)
Fade.ino
This example shows how to fade an LED on Pin 3 using the analogWrite()
function. The fade goes both directions (fades on and then fades off)
BlinkRGB.ino
Flashes (blinks) through a series of colors using the RGB LED. For a simpler version of this code, see BlinkRGBSimple.ino.
BlinkRGBSimple.ino
Flashes (blinks) through a series of colors using the RGB LED. Should be more straightforward to understand than BlinkRGB.ino
BlinkRGBBrightness.ino
Flashes (blinks) through a series of colors using the RGB LED. The brightness of the RGB LED is set by _curBrightness
, which ranges from [0, 100] where 100 is brightest and 0 is off.
FadeRGB.ino
Fades through all of the colors of the RGB LED.
FadeHSL.ino
Fades through all of the colors of the RGB LED using the HSL color space.
The trim potentiometers you have in your kits have 0 - 10K ohms of resistance (see the Adafruit website)
TrimpotLED.ino
This example reads in a potentiometer value (from A0) and sets the brightness of an LED (hooked up to Pin 3).
TrimpotRGBBrightness.ino
This example reads in a potentiometer value (from A0) and sets the brightness of an RGB LED. For a simpler though less responsive version of this program, see TrimpotRGBBrightnessSimple.
TrimpotRGBBrightnessSimple.ino
This example reads in a potentiometer value (from A0) and sets the brightness of an RGB LED. While more straightforward than TrimpotRGBBrightness, it uses delay() function calls which makes the prototype seem less responsive to changes in the potentiometer.