From a12e71cee05064973b8d7dd85b31aac4eb78f262 Mon Sep 17 00:00:00 2001 From: JbLb Date: Wed, 1 Jan 2020 18:10:35 +0100 Subject: [PATCH] use arduino leonardo --- src/hoverserial.ino | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/hoverserial.ino b/src/hoverserial.ino index d6908c3..494ee11 100644 --- a/src/hoverserial.ino +++ b/src/hoverserial.ino @@ -1,8 +1,9 @@ // ******************************************************************* -// Arduino Nano 3.3V example code -// for https://github.com/EmanuelFeru/hoverboard-firmware-hack-FOC +// Arduino example code +// for https://mygit.jblb.net/jerome/hoverboard-firmware-hack-FOC // // Copyright (C) 2019-2020 Emanuel FERU +// modified by jblb // // ******************************************************************* // INFO: @@ -10,6 +11,11 @@ // • The built-in (HW) Serial interface is used for debugging and visualization. In case the debugging is not needed, // it is recommended to use the built-in Serial interface for full speed perfomace. // • The data packaging includes a Start Frame, checksum, and re-syncronization capability for reliable communication +// +// by JbLb +// • Converted to platformio +// • Adapted to Arduino leonardo to use CDC serail interface + // // CONFIGURATION on the hoverboard side in config.h: // • Option 1: Serial on Left Sensor cable (long wired cable) @@ -30,8 +36,10 @@ #define SPEED_MAX_TEST 300 // [-] Maximum speed for testing //#define DEBUG_RX // [-] Debug received data. Prints all bytes to serial (comment-out to disable) +#ifndef AVR_LEONARDO #include SoftwareSerial HoverSerial(2,3); // RX, TX +#endif // Global variables uint8_t idx = 0; // Index for new data pointer