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:08b2ea7d9cbd, committed 2018-05-18
- Comitter:
- POR09
- Date:
- Fri May 18 17:50:54 2018 +0000
- Commit message:
- CAN_ID
Changed in this revision
diff -r 000000000000 -r 08b2ea7d9cbd TextLCD.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.lib Fri May 18 17:50:54 2018 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/simon/code/TextLCD/#308d188a2d3a
diff -r 000000000000 -r 08b2ea7d9cbd main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri May 18 17:50:54 2018 +0000
@@ -0,0 +1,62 @@
+#include "mbed.h"
+#include "TextLCD.h"
+
+Ticker timer;
+CAN can1(PA_11,PA_12);
+CAN can2 (PB_12,PB_13);
+char d[]="12345678";
+TextLCD lcd(D7,D6, D5, D4, D3, D2, TextLCD::LCD16x2); // rs, e, d4-d7
+CANMessage msg;
+
+ void enviar()
+ {
+ can1.write(CANMessage(400,d,8));// método CANMessage para enviar mensaje
+ }
+void leer()
+ {
+ if(can2.read(msg))
+ {
+ // lcd.printf("Len: %d\t", msg.len);
+ // lcd.printf("ID: %d\n", msg.id);
+ /* lcd.printf("Dato 1 recibido: %d\n\n", msg.data[0]);
+ lcd.cls();
+ lcd.printf("Dato 2 Recibido: %d\t", msg.data[1]);
+ lcd.cls();
+
+ lcd.printf("Dato 3 Recibido: %d\n\n", msg.data[2]);
+ lcd.cls();
+
+ lcd.printf("Dato 4 Recibido: %d\n\n", msg.data[3]);
+ lcd.cls();
+
+ lcd.printf("Dato 5 Recibido: %d\n\n", msg.data[4]);
+ lcd.cls();
+
+ lcd.printf("Dato 6 Recibido: %d\n\n", msg.data[5]);
+ lcd.cls();
+
+ lcd.printf("Dato 7 Recibido: %d\n\n", msg.data[6]);
+ lcd.cls();
+
+ lcd.printf("Dato 8 Recibido: %d\n\n", msg.data[7]);
+ lcd.cls();*/
+
+
+
+
+ return;
+ }
+ }
+
+
+ int main()
+ {
+ lcd.printf("HOLA MUNDO");
+ //timer.attach(&enviar, 5);
+ // can2.attach(&leer,CAN::RxIrq);
+
+ while(1)
+ {
+
+ }
+ }
\ No newline at end of file
diff -r 000000000000 -r 08b2ea7d9cbd mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri May 18 17:50:54 2018 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/5aab5a7997ee \ No newline at end of file