BrickUp API Service for Docker version.

moveSVBServo.ino 602B

12345678910111213141516171819202122232425262728
  1. #include <FR_SVBServo.h>
  2. #include <SoftwareSerial.h>
  3. SoftwareSerial SSerial(7,8); // RX, TX
  4. FR_SVBServo mServo(&SSerial,544,2400);
  5. void setup() {
  6. // put your setup code here, to run once:
  7. for(int i=0;i<18;i++)
  8. mServo.moveServo(i,90,100);
  9. }
  10. void loop() {
  11. // put your main code here, to run repeatedly:
  12. byte degree[18];
  13. for(int i=0;i<18;i++)
  14. degree[i]=180;
  15. mServo.moveServoArray(degree,1000,0,17);
  16. delay(2000);
  17. while(!mServo.servoActive());
  18. for(int i=0;i<18;i++)
  19. degree[i]=0;
  20. mServo.moveServoArray(degree,2000,0,17);
  21. delay(2000);
  22. while(!mServo.servoActive());
  23. }