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: EthernetInterface mbed-rtos mbed
Revision 1:908da4276ab9, committed 2017-04-14
- Comitter:
- 1050186
- Date:
- Fri Apr 14 03:35:01 2017 +0000
- Parent:
- 0:75a565860f44
- Commit message:
- Modify main.cpp
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Apr 13 05:59:19 2017 +0000
+++ b/main.cpp Fri Apr 14 03:35:01 2017 +0000
@@ -54,7 +54,7 @@
// Send message
ret = TCP_send(&send_packet, sizeof(send_packet), PEACH_2_IP_ADDRESS, PEACH_2_PORT);
if (ret >= 0) {
- printf("Send message : 0x%02X\n", send_packet.data);
+ printf("Send message : %d\n", send_packet.data);
led1 = !led1;
} else {
printf("send failed!!\n");
@@ -150,9 +150,10 @@
if (ret >= 0) {
printf("Received message : %d\n", recv_packet.data);
// Send message
+ memcpy(&send_packet, &recv_packet, sizeof(send_packet));
ret = TCP_send(&send_packet, sizeof(send_packet), PEACH_3_IP_ADDRESS, PEACH_3_PORT);
if (ret >= 0) {
- printf("Send message : 0x%02X\n", send_packet.data);
+ printf("Send message : %d\n", send_packet.data);
led2 = !led2;
} else {
printf("send failed!!\n");