Stap 4: Eerste test – controle van Skywatcher virtuoos Mount
Welke you´ll moet:
-1 x RJ11-connector
-2 x 220 Ohm Resistor
-2 x 8 pins Arduino stapelbare kop, 1 x 6-pins Arduino stapelbare kop en 1 x 10-pins Arduino stapelbare kop
-1 x Comunication kabel
-1 x tb.shield PCB
-1 x virtuoos Mount
Panohead bibliotheek: download hier - panohead library.
De code: download hier - panohead_test.
# opnemen
# opnemen
VOID Setup {}
panohead.init();
}
void loop {}
lange lngPositionPitch = 0;
lange lngPositionYaw = 0;
Lezen van de huidige positie
lngPositionPitch = panohead.readAxisPosition(PANOH_AXIS_PITCH);
lngPositionYaw = panohead.readAxisPosition(PANOH_AXIS_YAW);
lngPositionPitch = lngPositionPitch + panohead.fromAngle(20.0);
lngPositionYaw = lngPositionYaw + panohead.fromAngle(20.0);
20 graden beweging in beide assen
panohead.driveToPositionBothAxis (lngPositionYaw, lngPositionPitch);
delay(20000);
lngPositionPitch = panohead.readAxisPosition(PANOH_AXIS_PITCH);
lngPositionYaw = panohead.readAxisPosition(PANOH_AXIS_YAW);
lngPositionPitch = lngPositionPitch + panohead.fromAngle(-20.0);
lngPositionYaw = lngPositionYaw + panohead.fromAngle(-20.0);
20 graden beweging in beide as in de tegenovergestelde richting
panohead.driveToPositionBothAxis (lngPositionYaw, lngPositionPitch);
delay(20000);
}
Nu we alleen maar hoeven om te solderen de RJ11 (U5 op PCB), de twee 220 Ohm Resistor (R7 en R8 op PCB) en de stapelbare koppen in de juiste plaatsen, sluit alles uploaden en de code voor de Arduino Board. De virtuoos Mount moet bewegen de twee as 20 graden in één richting en na 20 sec in de andere.