For the project in AGH

Dependencies:   mbed Servo BSP_DISCO_F413ZH

Files at this revision

API Documentation at this revision

Comitter:
manumanumanu
Date:
Mon Jun 27 09:58:29 2022 +0000
Commit message:
Servos;

Changed in this revision

BSP_DISCO_F413ZH.lib Show annotated file Show diff for this revision Revisions of this file
Servo.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 401936269c3e BSP_DISCO_F413ZH.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BSP_DISCO_F413ZH.lib	Mon Jun 27 09:58:29 2022 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/ST/code/BSP_DISCO_F413ZH/#0f07a9ac06f7
diff -r 000000000000 -r 401936269c3e Servo.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Servo.lib	Mon Jun 27 09:58:29 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/simon/code/Servo/#36b69a7ced07
diff -r 000000000000 -r 401936269c3e main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Jun 27 09:58:29 2022 +0000
@@ -0,0 +1,56 @@
+#include "mbed.h"
+#include "Servo.h"
+#include "stm32f413h_discovery.h"
+#include "stm32f413h_discovery_ts.h"
+#include "stm32f413h_discovery_lcd.h"
+#include "stdlib.h"
+
+
+DigitalOut myled1(LED1);
+DigitalOut myled2(LED2);
+
+Servo myservo(D9); //PIN D9
+
+
+int main()
+{
+    BSP_LCD_Init();
+    BSP_LCD_Clear(LCD_COLOR_WHITE);
+
+     int counter=0;
+    
+    myled1 = 0;            //LED1 is OFF
+    myled2 = 0;            //LED2 is OFF
+
+
+    BSP_LCD_SetTextColor(LCD_COLOR_BLACK);
+
+    while(1) {
+        
+               
+        for(counter=0; counter<100; counter++) {
+              myservo = counter/100.0;
+              wait(0.01);
+              myled1 = 1;
+              myled2 = 0;
+              BSP_LCD_DisplayStringAt(0, 80, (uint8_t *)"counter-clockwise", CENTER_MODE);
+        }
+       BSP_LCD_Clear(LCD_COLOR_WHITE);
+       for(counter=100; counter>0; counter--) {
+              myservo = counter/100.0;
+              wait(0.01);
+              myled1 = 0;
+              myled2 = 1;
+              BSP_LCD_DisplayStringAt(0, 80, (uint8_t *)"clockwise", CENTER_MODE);
+      }
+      BSP_LCD_Clear(LCD_COLOR_WHITE);
+      
+
+
+    
+    
+
+    }
+}
+
+
diff -r 000000000000 -r 401936269c3e mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Jun 27 09:58:29 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file