Digital I/O with Arduino Boards + Diffuser

Posted by Annie

Annie's picture

For this lab:

We were asked to control the output of three LED lights using the Arduino board and a manual input, such as with a keyboard control. Also, to build a diffuser to cover the LEDs.

Materials:

3 LEDs

3 220K Resistors

Arduino, Breadboard, Wires

Poster, Glue (for the Diffuser)

0
Your rating: None
Posted by dperry

dperry's picture

Description

Design a diffuser for your RGB LEDs

A2_I:O.jpg
0
Your rating: None
Posted by prayag

prayag's picture

The idea is to be able to change the color of the LEDs from the console. Consists of two parts. A python code which sends the string while Arduino code which parses the string a lights up the LEDs.

 

Arduino code

 

 

Screenshot of desktop application interacting with arduino
0
Your rating: None
Posted by tearkj

tearkj's picture

Description

Use Keyboard to control LED color combination.

Components Used

  • R,G,B LEDs
  • Resistors 220
  • Wires
  • Diffuser

Arduino Code

/*
 * Serial RGB LED - TUI Homework
 * ---------------
 * Serial commands control the brightness of R,G,B LEDs
 *
 * Command structure is multiple typing or 'r' 'g' 'b' keys
 */

board
0
Your rating: None
Posted by icheung

icheung's picture

Description

- Design a diffuser for LEDs

- Play with keyboard input or other to control 3 LEDs (red, green, blue)

 

Components Used

Diffuser: A muffin cup and a glass bowl.

LEDs: red, green and blue!

220 ohm resistors

 

Extra Fun

Prayag and I worked together to create a Color Picker GUI which allows a user to select a color from a color palette of RGB values which then gets sent over the serial port to the arduino.

 

Arduino Code

***********************************

Color Picker GUI
0
Your rating: None
Posted by yoon

yoon's picture

/* Components Used: leds, Arduino board, piece of bridal vail for diffuser */

/* Diffuser is made with bridal vail, in rose shape so that it covers the leds with many layers  */

/*The user can command the color red, yellow or blue at first by 'R', 'Y', 'B', and adjust the color by increasing or decreasing rgb value. */

/* to increase   red: 'r ' ; green: 'g'  ; blue: 'b' */

/* to decrease    red: 'x'  ; green:'y' ; blue: 'z' */

 

 

clear
0
Your rating: None
Posted by Cole

Cole's picture

Diffuser: Tracing paper on inside of a jar.

keyboard command codes color mapping: r=red, b=blue, g=green, y=r+g, t=b+g, p=b+r, a=r+b+g

color codes {r,g,b,y,t,p,a} fade from full power color to 0.

color codes {R,G,Y,T,P,A} fade from 0 to full power.

 

code:

 

lab2_cole.jpg
0
Your rating: None
Posted by jlzych

jlzych's picture

Description

This lab and HW uses keyboard input to modify the PWM to create different colors with the RGB LEDs. My diffuser isn't a typical diffuser. I took pieces of a Subway straw (which is an opaque white) and put a piece on each LED (see attached picture, it's cooler in real life). This doesn't diffuse the light equally, but rather creates cylinders of colored light.

Components

Breadboard

Arduino Microcontroller

RGB LEDs

Resistors

Subway straw

Diffuser
0
Your rating: None
Posted by apoorvas

apoorvas's picture

 

IMG_9556_1.jpg
0
Your rating: None
Posted by wk

wk's picture

 

P1080540.jpg
0
Your rating: None