KRITSADA

ZX-Servo16i writing function

Oct 13th, 2015
2,177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. void servoWrite(byte CH,int POS){
  2. byte L,H;
  3.   Serial1.print("!SC");
  4.   Serial1.write(CH);
  5.   Serial1.write(0x00);
  6.   L=lowByte(POS);  
  7.   H=highByte(POS);
  8.   Serial1.write(L);
  9.   Serial1.write(H);  
  10.   Serial1.write(0x0D);  
  11. }
Advertisement
Add Comment
Please, Sign In to add comment