Program the 7 Segment display on your RenBed using this program. Import the program into your Compiler and edit the code to display your birthday (DD > 5s wait > MM).
Dependencies: SevenSegmentDisplay mbed
Fork of Renbed_Seven_Segment by
main.cpp@2:6dd23fbe7e50, 2016-10-13 (annotated)
- Committer:
- lawrences
- Date:
- Thu Oct 13 08:42:22 2016 +0000
- Revision:
- 2:6dd23fbe7e50
- Parent:
- 1:2a6f19dca1f4
version 2, defaults changed to Christmas day with a 2 second delay
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
MiskinPrj | 0:72cebff52cec | 1 | /********************************************************* |
MiskinPrj | 0:72cebff52cec | 2 | *Renbed_Seven_Segment * |
MiskinPrj | 0:72cebff52cec | 3 | *Author: Dan Argust * |
MiskinPrj | 0:72cebff52cec | 4 | * * |
lawrences | 2:6dd23fbe7e50 | 5 | *Edited for use at Cotham School by SL * |
MiskinPrj | 0:72cebff52cec | 6 | *********************************************************/ |
MiskinPrj | 0:72cebff52cec | 7 | |
MiskinPrj | 0:72cebff52cec | 8 | #include "mbed.h" |
MiskinPrj | 0:72cebff52cec | 9 | #include "SevenSegmentDisplay.h" |
MiskinPrj | 0:72cebff52cec | 10 | |
MiskinPrj | 0:72cebff52cec | 11 | SevenSegmentDisplay seg(0); //creating the driver object |
MiskinPrj | 0:72cebff52cec | 12 | |
MiskinPrj | 0:72cebff52cec | 13 | int main(){ |
lawrences | 2:6dd23fbe7e50 | 14 | seg.DisplayDigits(2,5); //display the digits 2 and 5 for the the 25th day |
lawrences | 2:6dd23fbe7e50 | 15 | wait(2); //wait 2 seconds |
lawrences | 2:6dd23fbe7e50 | 16 | seg.DisplayDigits(1,2); //display the digits 1 and 2 for the 12th month |
MiskinPrj | 0:72cebff52cec | 17 | } |