Sensing Part 1: Potentiometers

carlos.sandoval's picture

Lab 3

Turns on/off and adjusts brigthness of 3 LEDs

 

/*

 * AnalogInput

 * by DojoDave <http://www.0j0.org>

 *

 * Turns on/off and adjusts brigthness of 3 LEDs connected to digital 

 * pins 9,10, and 11. The amount of time the LED will be on/off and the brigthness depends 

 * on the value obtained by analogRead(). Pots are connected to analog pins 1 and 2.

 *

 */

// select input pin for potentiometers

1.jpg
0
Your rating: None

Potentiometers

/*
 * one pot controls brightness another how fast the leds blink.
 * modified version of AnalogInput
 * by DojoDave <http://www.0j0.org>
 * http://www.arduino.cc/en/Tutorial/AnalogInput
 */
int blinkPotPin = 1; // select the input pin for the potentiometer to control blink
int brightPotPin = 0; // select the input pin for the potentiometer to control brightness
int redPin = 9;   // select the pin for the LEDs
int greenPin = 10;
int bluePin = 11;

photo-6.jpg
5
Your rating: None Average: 5 (1 vote)
kilian.moser's picture

Manually controlling LEDs

First assignment:

Code allows to control the intensity of three LEDs using three potentiometers. RGB Values are sent to the serial monitor for debugging.

0
Your rating: None
ldevendorf's picture

2 Pots - Directional Color Shifting

Description:

This code users two potentiometers to control three LEDS.  Twisting one pot "moves" the light along the LEDS in a direction parallel to the direction of turning.  Twisting the other pot adjusts the brightness of of the LEDs. 

Materials:

  • 2 Potentiometers
  • 3 LEDs
  • 1 Arduino Uno Controller

Arduino Code:

Board Setup
0
Your rating: None

Lab 3

Lab 3: Potentiometers

Part 1

1) 1PotBlink

3-Potentiometers-Fading-3-LEDs
0
Your rating: None
Johnparayno's picture

Control LED(s) with multiple pots

 

1.JPG
0
Your rating: None
martin.kiechle's picture

The Rainbow-Strobe

/*
 * The Rainbow-Strobe
 *
 * Using the three potentiometers it is possible to
 * 1. change the color in the rainbow spectrum (red-orange-yellow-green-blue-purple-red)
 * 2. modify the brightness
 * 3. control the strobe effect
 *
 * Theory and Practise of Tangible User Interfaces
 * Lab Assignment 3
 *
 * Martin Kiechle
 * 9/20/2011
 */

/*
 * variables and allocations
 */

0
Your rating: None

Lab 3: Potentiometers

Components
1x potentiometer (soldered)
1x potentiometer (solderless)
2x led, 2x 330 ohms
1x breadboard, 1x arduino

Source code

 

P1010165.JPG
0
Your rating: None
kiera's picture

Potentiometers

Using potentiometer to change the resistance of voltage sent to the LED gives a range that takes advantage of analog INPUT.

Description

Using two potentiometers we control the LEDs rate of blinking and range of brightness.

Materials

LEDs

Potentiometers

Breadboard and fixin's

 

Code

HW #3
0
Your rating: None

Lab - Potentiometers

Here's the code i made/adapted, after soldering the pots, and connecting to analog.

 

 

336851_831590314425_24400806_38854545_1259163488_o (1).jpg
0
Your rating: None
Syndicate content