Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int pent = A0;
- int val = 0;
- int led = 10;
- void setup() {
- // put your setup code here, to run once:
- pinMode(pent, INPUT);
- Serial.begin(9600);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- val = analogRead(pent);
- Serial.println(val);
- analogWrite(led, val/4);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement