What does it mean?


i having trouble understanding code involved in example sketch number 06b (in book: getting started arduino massimo banzi). can 1 please explain me? code:

code: [select]
// example 06b: set brightness of led to
// brightness specified the
// value of analogue input

#define led 9 // pin led

int val = 0;  // variable used store value
             // coming sensor
void setup() {
 
 pinmode(led, output); //
 
 // note: analogue pins are
 // automatically set intputs
}

void loop() {
 
 val = analogread(0); // read value sensor
 
 analogwrite(led, val/4); // turn led on @
                          // brightness set
                          // sensor
                         
 delay(10); // stop program for
            // time
}

the comments in code give line line explanation. there part in particular not understand? or overall concepts having trouble with? answering questions let know needs explained in more detail.


Arduino Forum > Forum 2005-2010 (read only) > Software > Development > What does it mean?


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums