Friday, October 12, 2012

October 12 Meeting: Summary, Part 1

Members have asked about how much the current and voltage change when the analogwrite function is used. To test the current and voltage, I connected a multimeter to the Arduino across pin 9 and ground, and ran the following code:

int pin = 9;

void setup() {               
  pinMode(led, OUTPUT);    
}

void loop() {
  for (int i = 0; i < 256; i = i + 10){
    analogWrite(pin, i);  
    delay(5000);              
  }
}

Here is the multimeter attached to the Arduino and meter dial:


Here is the graph of the output (10K Ohm resistor used to calculate the current):


No comments:

Post a Comment