From 7559e78719ad51139f502d6f13bf2ff4522488ac Mon Sep 17 00:00:00 2001 From: Youen Toupin Date: Sat, 12 Mar 2022 12:22:36 +0100 Subject: [PATCH] symlink hacks to make Arduino IDE use local libraries --- ESP32/.cproject | 12 +++++++++--- ESP32/register-libraries.sh | 9 +++++++++ ESP32/vehicle-monitor.cpp | 30 ++++++++---------------------- 3 files changed, 26 insertions(+), 25 deletions(-) create mode 100755 ESP32/register-libraries.sh diff --git a/ESP32/.cproject b/ESP32/.cproject index e326db6..0d4d3cc 100644 --- a/ESP32/.cproject +++ b/ESP32/.cproject @@ -11,10 +11,16 @@ + - - + + + + + + + - + \ No newline at end of file diff --git a/ESP32/register-libraries.sh b/ESP32/register-libraries.sh new file mode 100755 index 0000000..88eaed9 --- /dev/null +++ b/ESP32/register-libraries.sh @@ -0,0 +1,9 @@ +#!/bin/sh +DIR="$( cd "$( dirname "$0" )" && pwd )" + +rm -f -- ~/Arduino/libraries/AsyncTCP +ln -s $DIR/3rdparty/AsyncTCP ~/Arduino/libraries/AsyncTCP + +rm -f -- ~/Arduino/libraries/ESPAsyncWebServer +ln -s $DIR/3rdparty/ESPAsyncWebServer ~/Arduino/libraries/ESPAsyncWebServer + diff --git a/ESP32/vehicle-monitor.cpp b/ESP32/vehicle-monitor.cpp index 06baa90..a6410ff 100644 --- a/ESP32/vehicle-monitor.cpp +++ b/ESP32/vehicle-monitor.cpp @@ -1,31 +1,17 @@ -/* The true ESP32 chip ID is essentially its MAC address. -This sketch provides an alternate chip ID that matches -the output of the ESP.getChipId() function on ESP8266 -(i.e. a 32-bit integer matching the last 3 bytes of -the MAC address. This is less unique than the -MAC address chip ID, but is helpful when you need -an identifier that can be no more than a 32-bit integer -(like for switch...case). - -created 2020-06-07 by cweinhofer -with help from Cicicok */ - #include - -uint32_t chipId = 0; -void setup() { +#include +#include + +void setup() +{ Serial.begin(115200); } -void loop() { - for(int i=0; i<17; i=i+8) { - chipId |= ((ESP.getEfuseMac() >> (40 - i)) & 0xff) << i; - } - +void loop() +{ Serial.printf("ESP32 Chip model = %s Rev %d\n", ESP.getChipModel(), ESP.getChipRevision()); Serial.printf("This chip has %d cores\n", ESP.getChipCores()); - Serial.print("Chip ID: "); Serial.println(chipId); - + delay(3000); }