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
Revision 0:7c0bfc9d2e16, committed 2017-12-23
- Comitter:
- osmith2
- Date:
- Sat Dec 23 00:50:58 2017 +0000
- Child:
- 1:24717a795dc0
- Commit message:
- Created this to test out concatenation ideas rather than mess with working code. This, as far as I am aware, solves our problem, and the whole concatenate thing was over-complicating things???
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 Sat Dec 23 00:50:58 2017 +0000
@@ -0,0 +1,39 @@
+#include "mbed.h"
+
+
+
+
+
+Serial pc(USBTX, USBRX);
+
+
+
+int year = 2017;
+char month = 12;
+char day = 25;
+char hour = 23;
+char minute = 28;
+
+DigitalOut myled(LED1);
+
+int main() {
+ while(1) {
+ myled = 1; // LED is ON
+ wait(0.2); // 200 ms
+ myled = 0; // LED is OFF
+ wait(1.0); // 1 sec
+
+ //date
+ pc.printf("Year: %d\n", year);
+ pc.printf("Month: %d\n", month);
+ pc.printf("Day: %d\n", day);
+ //time
+ pc.printf("Hour: %d\n", hour);
+ pc.printf("Minute: %d\n", minute);
+
+
+ // SOOooooo, am I retarded or can we not just do this?
+ pc.printf("Date and time: %d.%d.%d.%d.%d \n", year, month, day, hour, minute);
+ pc.printf("Merry christmas!");
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Dec 23 00:50:58 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/7130f322cb7e \ No newline at end of file