diff --git a/ino/components/mcopy_capper/mcopy_capper.ino b/ino/components/mcopy_capper/mcopy_capper.ino index 3d1c147..a677500 100644 --- a/ino/components/mcopy_capper/mcopy_capper.ino +++ b/ino/components/mcopy_capper/mcopy_capper.ino @@ -1,4 +1,4 @@ - #include +#include boolean debug_state = true; @@ -10,8 +10,8 @@ Red - 5V Black - GND Yellow - PWM Pin (9 in this example) -Using TowerPro SG-5010 + - TowerPro +Using TowerPro SG-5010 - default angle 93 + TowerPro MG-995 - default angle 93 as servos for development ---------------------------------------------------- */ diff --git a/ino/components/mcopy_servo_debug/mcopy_servo_debug.ino b/ino/components/mcopy_servo_debug/mcopy_servo_debug.ino new file mode 100644 index 0000000..4788f54 --- /dev/null +++ b/ino/components/mcopy_servo_debug/mcopy_servo_debug.ino @@ -0,0 +1,36 @@ +#include + +const int PIN_SERVO = 9; +Servo servo; + +/* +---------------------------------------------------- +Servo - Arduino + - +Red - 5V +Black - GND +Yellow - PWM Pin (9 in this example) + +Using TowerPro SG-5010 - default 93 + TowerPro MG-995 - +as servos for development +---------------------------------------------------- +*/ + +void setup() { + Serial.begin(57600); + Serial.flush(); + + Servo_init(); +} + +void loop() { + +} + +void Servo_init () { + servo.attach(PIN_SERVO); + int angle = servo.read(); + Serial.print("Default angle: "); + Serial.println(angle); +}