Lab 2 Working with Pots
This Lab worked with analog circuits. This first part was not too challenging. Here is the code that I used for this.
int potPin = 0; // analog pin that pot attaches too “blue wire”
int potValue = 0; //value initial
int led = 9; // displays what the pot is doing
potValue = analogRead(potPin); //read pot value
analogWrite(led, potValue/4); //pwm led w/ pot value
For more info about this lab click here