Advertisement
Guest User

arduino 1

a guest
Dec 3rd, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. int AI3;
  2. int AI;
  3. int VALUE;
  4.  
  5. void setup()
  6. {
  7. pinMode(11, OUTPUT);
  8. pinMode(A3, INPUT);
  9. Serial.begin(9600);
  10. }
  11.  
  12. void loop()
  13. {
  14. AI3 = analogRead(A3);
  15. AI = map(AI3, 0, 1023, 0, 255);
  16. analogWrite(11, AI);
  17. VALUE = map(AI3, 0, 1023, 0, 100);
  18.  
  19. Serial.print("Vrednost:"); //Na zaslonu se izpiše "W ZANKA"
  20. Serial.print(" ");
  21. Serial.println(VALUE); //Na zaslonu pokaži vrenost ST
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement