
A sunrise alarm clock controlled through serial designed to run on a LPC 1768 and is currently being modified to run on a Nucleo board
Revision 4:f2f25ca84b32, committed 2015-08-16
- Comitter:
- propellerhead
- Date:
- Sun Aug 16 15:19:20 2015 +0000
- Parent:
- 2:223c142956c6
- Commit message:
- Changed pin-outs for the nucleo
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 223c142956c6 -r f2f25ca84b32 main.cpp --- a/main.cpp Thu Aug 06 17:22:57 2015 +0000 +++ b/main.cpp Sun Aug 16 15:19:20 2015 +0000 @@ -156,16 +156,16 @@ printf("ALARM!!!\r\n"); } void lightSequence(){ - if(redMs != 1000){ + if(redMs <= 1000){ redMs+=3; reds.pulsewidth_us(redMs); - }else if (yellowMs!=1000){ + }else if (yellowMs <= 1000){ yellowMs+=3; yellows.pulsewidth_us(yellowMs); - }else if (greenMs!=1000){ + }else if (greenMs <= 1000){ greenMs+=3; greens.pulsewidth_us(greenMs); - }else if (blueMs!=1000){ + }else if (blueMs <= 1000){ blueMs+=1; blues.pulsewidth_us(blueMs); }else{