DORA prova 1
Revision 3:99f8c29cbac7, committed 2022-03-01
- Comitter:
- pinofal
- Date:
- Tue Mar 01 16:32:55 2022 +0000
- Parent:
- 2:553cc8c4474f
- Commit message:
- prima release
Changed in this revision
| DORA_Actuator_Control.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/DORA_Actuator_Control.cpp Wed Oct 27 19:03:59 2021 +0000
+++ b/DORA_Actuator_Control.cpp Tue Mar 01 16:32:55 2022 +0000
@@ -7,7 +7,9 @@
DigitalOut OutPWMScafesso(PA_10);
// Output per pilotaggio attuatore DORA con funzioni PWM
-PwmOut OutPWM (PB_8);
+//PwmOut OutPWM (PB_3);
+DigitalOut OutPWM (PB_3);
+DigitalOut Relay(PB_8);
// User Button, LED
DigitalIn myOnBoardButton(USER_BUTTON); // pulsante Blu sulla scheda. Associato a PC_13
@@ -24,15 +26,24 @@
// inizializza il PWM
//OutPWM.period_us(1000); // periodo del PWM
//OutPWM.write(0.5); // inizializza duty cycle del PWM
+ Relay = 1;
+ wait(300);
+ Relay = 0;
while(true)
{
+ OutPWM=1;
+ wait_us(500);
+ OutPWM=0;
+ wait_us(500);
+ /*
//myOnBoardLed = 1;
OutPWMScafesso=1;
wait_us(000);
//myOnBoardLed = 0;
OutPWMScafesso = 0;
wait_us(1000);
+ */
}
}