Advertisement
Guest User

Untitled

a guest
Jan 27th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. int led = 10;
  2. int x = 0;
  3.  
  4. void setup() {
  5. // put your setup code here, to run once:
  6.  
  7. pinMode(led,OUTPUT);
  8. Serial.begin(9600);
  9.  
  10. }
  11.  
  12. void loop() {
  13. // put your main code here, to run repeatedly:
  14.  
  15. for(x=0;x<=255;x=x+10){
  16. analogWrite(led,x);
  17. Serial.println(map(x,0,255,0,5));
  18. delay(100);}
  19.  
  20. //gostaria de substituir esse delay por um millis
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement