Advertisement
timor2542

[4 DOF Robot Arm Keyestudio][Lab 02][ATX-2] Servo 2 Knob Test

Aug 2nd, 2021
813
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <ATX2.h>
  2. int x;
  3. void setup(){
  4.   OK();
  5.   glcdClear();
  6.   servo(3,100);
  7.   glcdMode(1);
  8.   setTextSize(2);
  9.   glcd(1,0,"Servo2:");
  10.   setTextSize(5);
  11. }
  12. void loop(){
  13.   x=knob(30,90);
  14.   servo(2,x);
  15.   glcd(1,0," %d   ",x);  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement