Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Using a Servo Motor (Single)

vosc3112 Apr 7th, 2020 197 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*Servo Rotation (Single)
  2.  * 4/7/20
  3.  */
  4.  
  5. #include <Servo.h>
  6.  
  7. Servo servoMotor;
  8.  
  9. void setup() {
  10.  
  11. servoMotor.attach (9); //Attach which pin the motor uses
  12.  
  13. }
  14.  
  15. void loop() {
  16.  
  17. //Turn the motor 180 degrees
  18. servoMotor.write(0);
  19.  
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top