Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int pot;
- int pot_map;
- void setup() {
- pinMode(11,OUTPUT);
- Serial.begin(9600);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- pot=analogRead(A0);
- pot_map=map(pot,0,1023,0,255);
- analogWrite(11,pot_map);
- Serial.println(pot);
- Serial.println(pot_map);
- delay(500);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement