GPIO program for K64F boards

Dependencies:   mbed DigitDisplay LED_Bar

Files at this revision

API Documentation at this revision

Comitter:
Niranjan_ravi
Date:
Wed Feb 05 19:46:54 2020 +0000
Parent:
0:880457ab5a77
Commit message:
LED BAR library program;

Changed in this revision

DigitDisplay.lib Show annotated file Show diff for this revision Revisions of this file
LED_Bar.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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DigitDisplay.lib	Wed Feb 05 19:46:54 2020 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/seeed/code/DigitDisplay/#d3173c8bfd48
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LED_Bar.lib	Wed Feb 05 19:46:54 2020 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/teams/Seeed/code/LED_Bar/#edcb13b58b4f
--- a/main.cpp	Thu Apr 18 19:24:12 2019 +0000
+++ b/main.cpp	Wed Feb 05 19:46:54 2020 +0000
@@ -1,19 +1,19 @@
 #include "mbed.h"
- 
-DigitalIn enable(PTE24);
-Serial      pc(USBTX, USBRX);
- 
-int main() {
-    pc.baud(115200);
-    while(1) {
-        pc.printf("its inside while loop now\n");
-        if(!enable) {
-            pc.printf("led is on\n");
-        }
-        else
-        {
-            pc.printf("false\n");
-        }
-        wait(0.25);
-    }
+//PWM output channel
+PwmOut PWM1(A5);
+int main()
+{
+PWM1.period_ms(500);
+int x;
+x=1;
+while(1)
+{
+PWM1.pulsewidth_ms(x);
+x=x+1;
+wait(2);
+if(x==500)
+{
+x=1;
+}
+}
 }
\ No newline at end of file