Decide right or left for you
Dependencies: mbed LCD_DISCO_F469NI TS_DISCO_F469NI BSP_DISCO_F469NI
Project description
Nothing more simple: this is a high quality project allowing the user to download cosmos random to find a direction in your life when you have no idea where to go.
The decisions are restrained to RIGHT or LEFT.
Features
- Cosmos download via SCP (secure copy using SSH for data transfer).
- Countdown displays the remaining downloading time.
- Pick randomly RIGHT or LEFT and display the choice with an arrow and text.
- Track the number of decision.
- Home button to download again the cosmos.
Instructions
- Plug the board to USB to supply the board with some electricity (if using USB micro ('USB USER' plug) you must put the jumper JP2 on 'USB', if using USB mini ('USB ST-LINK' plug) you must put the jumper JP2 on 'STLK').
- Wait a very short moment so the board boot and the touchscreen initialize (a green screen should appears).
- Touch anywhere on the touchscreen to start the cosmos downloading.
- Observe the random direction extracted from the cosmos.
- Touch again as many time as needed to decide again (the number of decision is displayed in the top left corner). NB: each cosmos download contains an infinity of random direction.
- If desired you can download again the cosmos via the home screen by touching the home button.
- If needed (the cosmos may be busy or broken), you can reset the board and go back on the home screen by pushing the black button or by plugging/unplugging the USB power cable.
Disclaimer
Injuries
Any injury resulting from an abnormal of the decider code cannot be imputed to the author of this code.
Joke
This is a fantasy, don't take it for serious.
Revision 10:0de9ce9dd5b8, committed 2019-05-29
- Comitter:
- nicovv44
- Date:
- Wed May 29 01:22:52 2019 +0000
- Branch:
- MasterchiefOffice
- Parent:
- 9:5c2f112a2b0b
- Child:
- 12:0b8bec9e6a32
- Commit message:
- Change text
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 5c2f112a2b0b -r 0de9ce9dd5b8 main.cpp --- a/main.cpp Wed May 29 01:16:44 2019 +0000 +++ b/main.cpp Wed May 29 01:22:52 2019 +0000 @@ -104,7 +104,7 @@ direction = rand()%2; switch(direction) { case LEFT: - sprintf((char*)text, "LEFT"); + sprintf((char*)text, "Masterchief"); /* //horizontal bar lcd.FillRect(250,300,300,20); @@ -131,7 +131,7 @@ */ break; case RIGHT: - sprintf((char*)text, "RIGHT"); + sprintf((char*)text, "The Office"); /* //horizontal bar lcd.FillRect(250,300,300,20);