Commit b9c990a7 authored by yids's avatar yids

some arduino things

parent a65b911e
......@@ -4,5 +4,5 @@ BOARD_TAG=atmega328
ARDUINO_LIBS=RadioHead SPI AESLib Wire LCDI2C_LK162 MemoryFree micro-ecc pagerlib
include /usr/share/arduino/Arduino.mk
DEVICE_PATH = /dev/ttyUSB2
DEVICE_PATH = /dev/ttyUSB1
TARGET = arduino-rx
......@@ -74,14 +74,21 @@ void loop()
pl_send_message(context);
uint8_t buffer[sizeof(struct pl_pagermessage)];
memcpy(context->msg, buffer, sizeof(struct pl_pagermessage));
;
manager.setHeaderId(52);
manager.sendto(buffer ,sizeof(struct pl_pagermessage), 2);
manager.waitPacketSent();
//receive the message
context->kp = receiver;
pl_receive_message(context);
Serial.println("decrypted msg:");
Serial.println(context->msg->msg);
//free(sender);
//free(receiver);
//free(context);
delay(200);
// delay(200);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment