Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed DigitDisplay LED_Bar
Revision 2:a1e7d7fa0db2, committed 2020-02-05
- 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
--- /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