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.
Revision 1:2e8c02d29418, committed 2020-07-19
- Comitter:
- kevinsullivan
- Date:
- Sun Jul 19 19:46:59 2020 +0000
- Parent:
- 0:94dcb8c6ed26
- Child:
- 2:cc5021b73dc1
- Commit message:
- summerlab2020q2_1
Changed in this revision
| C12832.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/C12832.lib Sun Jul 19 19:46:59 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/chris/code/C12832/#7de323fa46fe
--- a/main.cpp Sat Jul 18 08:59:16 2020 +0000
+++ b/main.cpp Sun Jul 19 19:46:59 2020 +0000
@@ -6,15 +6,15 @@
pc.printf("Press 'u' to turn LED1 brightness up, 'd' to turn it down\n");
while(1) {
char c = pc.getc();
- if((c == 'u') && (brightness < 0.5)) {
+ if((c == 'u') & (brightness < 0.5)) {
brightness += 0.01;
led = brightness;
- pc.putc('^');// using "^" for LED brightness up
+ pc.putc('^');// using "^" for LED brightness up
}
- if((c == 'd') && (brightness > 0.0)) {
+ if((c == 'd') & (brightness > 0.0)) {
brightness -= 0.01;
led = brightness;
- pc.putc('&&');//using "&&" for down LED brightness down
+ pc.putc('~');//using " ~ " for down LED brightness down
}
}
}
\ No newline at end of file