Youen Toupin
3 years ago
6 changed files with 76 additions and 0 deletions
@ -0,0 +1,20 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||||
|
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage"> |
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.settings"> |
||||||
|
<cconfiguration id="org.eclipse.cdt.core.default.config.1559961769"> |
||||||
|
<storageModule buildSystemId="org.eclipse.cdt.core.defaultConfigDataProvider" id="org.eclipse.cdt.core.default.config.1559961769" moduleId="org.eclipse.cdt.core.settings" name="Configuration"> |
||||||
|
<externalSettings/> |
||||||
|
<extensions/> |
||||||
|
</storageModule> |
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> |
||||||
|
</cconfiguration> |
||||||
|
</storageModule> |
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/> |
||||||
|
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/> |
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.pathentry"> |
||||||
|
<pathentry include="~/.arduino15/packages/esp32/hardware/esp32/1.0.6/cores/esp32" kind="inc" path="" system="true"/> |
||||||
|
<pathentry include="~/.arduino15/packages/esp32/hardware/esp32/1.0.6/tools/sdk/include/newlib" kind="inc" path="" system="true"/> |
||||||
|
<pathentry kind="out" path="build"/> |
||||||
|
<pathentry kind="src" path=""/> |
||||||
|
</storageModule> |
||||||
|
</cproject> |
@ -0,0 +1,20 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<projectDescription> |
||||||
|
<name>ESP32</name> |
||||||
|
<comment></comment> |
||||||
|
<projects> |
||||||
|
</projects> |
||||||
|
<buildSpec> |
||||||
|
<buildCommand> |
||||||
|
<name>org.eclipse.cdt.core.cBuilder</name> |
||||||
|
<triggers>clean,full,incremental,</triggers> |
||||||
|
<arguments> |
||||||
|
</arguments> |
||||||
|
</buildCommand> |
||||||
|
</buildSpec> |
||||||
|
<natures> |
||||||
|
<nature>org.eclipse.cdt.core.cnature</nature> |
||||||
|
<nature>org.eclipse.cdt.core.ccnature</nature> |
||||||
|
<nature>org.eclipse.cdt.make.core.makeNature</nature> |
||||||
|
</natures> |
||||||
|
</projectDescription> |
@ -0,0 +1,3 @@ |
|||||||
|
// This file only exists to make the Arduino IDE happy
|
||||||
|
// The actual entry points are in vehicle-monitor.cpp (because .ino extension is non-standard)
|
||||||
|
// Notice we don't even need to include anything as the Arduino IDE automatically compiles all .cpp files that are in the sketch folder
|
@ -0,0 +1,31 @@ |
|||||||
|
/* 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 <Arduino.h> |
||||||
|
|
||||||
|
uint32_t chipId = 0; |
||||||
|
|
||||||
|
void setup() { |
||||||
|
Serial.begin(115200); |
||||||
|
} |
||||||
|
|
||||||
|
void loop() { |
||||||
|
for(int i=0; i<17; i=i+8) { |
||||||
|
chipId |= ((ESP.getEfuseMac() >> (40 - i)) & 0xff) << i; |
||||||
|
} |
||||||
|
|
||||||
|
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); |
||||||
|
} |
Loading…
Reference in new issue