KRITSADA

pop-7 servo test toggle with sw_OK

Feb 28th, 2018
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <pop7.h>  // POP-X2 Board
  2. void setup() {
  3.   setTextSize(2);
  4.   OK();
  5. }
  6. void loop() {
  7.   while(!sw_OK()){
  8.   servo(1,knob(180));
  9.     glcd(0,0,"Servo1");
  10.     glcd(1,0,"%d  ",knob(180));
  11.   }
  12.   while(!sw_OK()){
  13.   servo(2,knob(180));
  14.     glcd(0,0,"Servo2");
  15.     glcd(1,0,"%d  ",knob(180));
  16.   }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment