Search this site
Physical Computing 2010
>
Joseph Constan's Log
>
Assignment 10.1
posted
Aug 1, 2010, 10:14 AM
by Unknown user
[ updated
Aug 1, 2010, 10:24 AM
]
Pretty simple, so I'll just get right to it. Code:
const int pot1 = 4;
const int led1 = 9;
int brightness;
void setup() {
}
void loop() {
brightness = map(analogRead(pot1), 0, 1023, 0, 255);
analogWrite(led1, brightness);
delay(50);
}
Comments
Navigation
Electronics Class
Sitemap
Recent site activity
Collin and Matts Robot
edited by Matthew Heise
attachment from Matthew Heise
Musical Shield Project - Ian and Nick
edited by Nicholas Muszynski
attachment from Nicholas Muszynski
Collin and Matts Robot
created by Matthew Heise
Sound Board
edited by Steve Dickie
ButtonMasherz
edited by Sean Vichinsky
View All