SLIP-Send-CRC
Send a SLIP package over the serial port every 5 seconds.
- Boards:
- AVR, AVR USB, Nano Every, Nano 33, Due, Teensy 3.x, ESP8266, ESP32
- Upload this sketch to one Arduino.
- Upload the SLIP-Receive-CRC.ino sketch to a second Arduino.
- Connect the TX pin of this Arduino to the RX pin of the second Arduino.
- Open the Serial monitor of the second Arduino.
It should print the following:
Received packet: Hello, world!
Size: OK
Checksum: OK
For boards where Serial
is not a hardware UART, use Serial1
as the stream for the SLIPStream.
Written by PieterP, 2020-02-07
https://github.com/tttapa/Arduino-KVComm
#include <boost/crc.hpp>
using CRC = boost::crc_optimal<16, 0x1021, 0xFFFF, 0, false, false>;
Serial,
CRC(),
nullptr,
CRC(),
};
void setup() {
Serial.begin(115200);
}
void loop() {
uint8_t data[] = "Hello, world!";
delay(5000);
}