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 SimpleRGB mbed-rtos 4DGL-uLCD-SE SDFileSystem wave_player
Revision 0:51d88b4e2b23, committed 2016-10-09
- Comitter:
- kswanson31
- Date:
- Sun Oct 09 23:30:00 2016 +0000
- Child:
- 1:ff69d2d97a2c
- Commit message:
- Contains complete part 1, sketch of part 2
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sun Oct 09 23:30:00 2016 +0000
@@ -0,0 +1,88 @@
+#include "mbed.h"
+#include "rtos.h"
+
+/* 1 init/declare
+Ticker first;
+Ticker second;
+Ticker third;
+Ticker fourth;
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+DigitalOut led3(LED3);
+DigitalOut led4(LED4);
+
+void one() { // attached to ticker object. will be called after time given
+ led1 = !led1; // flip the value of the led
+} // nothing returned
+
+void two() {
+ led2 = !led2;
+}
+
+void three() {
+ led3 = !led3;
+}
+
+void fourth() {
+ led4 = !led4;
+}
+*/// - 1
+
+/* 2 init/declare */
+void uLCD_reboot_thread(void const *args) {
+ // show reboot process, associated with clip of apple restart
+ while (1) {
+ // lock, print 'Rebooting!' to uLCD with "progress_bar" underneath
+ // draw progress bar 8 sec
+ // draw an ascii 'apple'
+ // unlock, wait for 52
+ }
+}
+
+void uLCD_status_thread(void const *args) {
+ // show time with smile, frown, sad face at top right
+ while (1) {
+ // lock, update time at top right with smiley at top left
+ // unlock, wait for 20 sec
+ // lock, change to frown
+ // unlock, wait for 20 sec
+ // lock, change to sad
+ // unlock, wait for 20 sec
+ }
+}
+
+void rainbow_led_thread(void const *args) {
+ // reboot with white, then cycle through apple rainbow colors
+ while (1) {
+ // bright white, dim to nothing over 4 sec
+ // green
+ // yellow
+ // orange
+ // red
+ // purple
+ // blue
+ }
+}
+// - 2
+
+int main() {
+ /* 1 calls
+ led1 = 1, led2 = 1, led3 = 1, led4 = 1;
+
+ first.attach(&one, 1.0); // attach the function and when to call it
+ second.attach(&two, 2.0);
+ third.attach(&three, 3.0);
+ fourth.attach(&four, 4.0);
+ */// - 1
+
+ while(1) {
+ /* 2 speaker 'thread' calls */
+ // speaker plays mac reboot sound, error sound occasionally
+ // play reboot sound
+ // wait 20
+ // error
+ // wait 20
+ // error
+ // wait 20
+ } // interupts will occur automatically
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Oct 09 23:30:00 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/25aea2a3f4e3 \ No newline at end of file
