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.
Revision 0:70922a074fba, committed 2013-08-07
- Comitter:
- melse
- Date:
- Wed Aug 07 15:30:34 2013 +0000
- Commit message:
- Initial Commit
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 Wed Aug 07 15:30:34 2013 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+
+Serial pcSerial(USBTX, USBRX);
+CAN can(p9, p10);
+char charBuffer;
+DigitalOut led1(LED2);
+DigitalOut led2(LED2);
+
+int main() {
+ pcSerial.baud(9600);
+ while(1) {
+ if (pcSerial.readable()) {
+ charBuffer = pcSerial.getc();
+ if (can.write(CANMessage(1337, &charBuffer, 1))) {
+ pcSerial.printf("Writing: %c\n", charBuffer);
+ led2 = !led2;
+ }
+ led1 = !led1;
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Aug 07 15:30:34 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/e3affc9e7238 \ No newline at end of file