Skip to content

jonfroehlich/HCID521Wi2019

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HCID521Wi2019

The github repo for HCID521 - Prototyping Studio Winter 2019

Arduino

Digital Output Examples

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.

Analog Output Examples

Using an LED

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)

Using the RGB LED

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.

Analog Input Examples

Using a Trim Potentiometer

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.

About

The github repo for HCID521 - Prototyping Studio Winter 2019

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published