Advertisement
Guest User

arduino example analogue

a guest
Dec 12th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. void setup(){
  2. //setting up the pins here
  3. pinMode(the pin u use , OUTPUT);
  4. }
  5.  
  6. void loop(){
  7. //to set a pin's value u have digitalWrite(); and analogueWrite();
  8. //digital goes like
  9. digitalWrite(the pin,HIGH);
  10. //OR
  11. digitalWrite(the pin,LOW);
  12. //but analogue goes like
  13. analogueWrite(the pin,number between 0-255);
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement