You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-6Lines changed: 50 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# ArduinoUniqueID
2
2
3
-
This Library gets the Unique Serial ID from the AVR Microcontroller.
3
+
This Library gets the Unique Serial ID from the AVR Microcontroller and ESP Microcontroller.
4
+
5
+
# AVR Microcontroller
4
6
5
7
## Unique Serial ID - Hidden Serial Number
6
8
@@ -23,21 +25,55 @@ Apparently, the chip Atmega328p have a hidden serial number with 9 bytes, and ot
23
25
| 0x0016 | Byte 8 | Byte 7 |
24
26
| 0x0017 | Byte 9 | Byte 8 |
25
27
26
-
## Dependencies
27
-
28
-
This library only works on AVR Microcontroller.
29
-
30
28
## Tested Microcontroller
31
29
32
30
* Atmega328pb - 10 bytes
33
31
* Atmega328p - 9 bytes
34
32
* Atmega2560 - 9 bytes
35
33
* Attiny85 - 9 bytes
36
34
35
+
# ESP Microcontroller
36
+
37
+
ESP microcontroller has basically two versions, ESP8266 and ESP32, each one has a specific function to request the chip id. <br/>
38
+
39
+
* ESP8266 - ESP.getChipId() - 4 bytes
40
+
* ESP32 - ESP.getEfuseMac() - 6 bytes
41
+
42
+
| UniqueID | ESP8266 | ESP32 |
43
+
| :-------: | :------: | :------:|
44
+
| Byte 0| Byte 0 | Byte 0 |
45
+
| Byte 1| Byte 1 | Byte 1 |
46
+
| Byte 2| Byte 2 | Byte 2 |
47
+
| Byte 3| Byte 3 | Byte 3 |
48
+
| Byte 4| - | Byte 4 |
49
+
| Byte 5| - | Byte 5 |
50
+
51
+
To make the variable UniqueID8 to work propably the library uses the default bytes to 0x00. <br/>
52
+
53
+
| UniqueID8 | ESP8266 | ESP32 |
54
+
| :-------: | :------: | :------:|
55
+
| Byte 0| 0x00 | 0x00 |
56
+
| Byte 1| 0x00 | 0x00 |
57
+
| Byte 2| 0x00 | Byte 0 |
58
+
| Byte 3| 0x00 | Byte 1 |
59
+
| Byte 4| Byte 0 | Byte 2 |
60
+
| Byte 5| Byte 1 | Byte 3 |
61
+
| Byte 6| Byte 2 | Byte 4 |
62
+
| Byte 7| Byte 3 | Byte 5 |
63
+
64
+
## Tested Microcontroller
65
+
66
+
* ESP8266 - 4 bytes
67
+
* ESP32 - 6 bytes
68
+
69
+
## Dependencies
70
+
71
+
This library only supports AVR Microcontroller and ESP Microcontroller.
72
+
37
73
## Installation
38
74
39
75
* Install the library by [Using the Library Manager](https://www.arduino.cc/en/Guide/Libraries#toc3)
40
-
***OR** by [Importing the .zip library](https://www.arduino.cc/en/Guide/Libraries#toc4) using either the [master](https://github.com/ricaun/ArduinoUniqueID/archive/1.0.3.zip) or one of the [releases](https://github.com/ricaun/ArduinoUniqueID/releases) ZIP files.
76
+
***OR** by [Importing the .zip library](https://www.arduino.cc/en/Guide/Libraries#toc4) using either the [master](https://github.com/ricaun/ArduinoUniqueID/archive/1.0.4.zip) or one of the [releases](https://github.com/ricaun/ArduinoUniqueID/releases) ZIP files.
41
77
42
78
## Examples
43
79
@@ -79,4 +115,12 @@ for(size_t i = 0; i < 8; i++)
79
115
Serial.println(UniqueID8[i], HEX);
80
116
```
81
117
118
+
### Method: UniqueID8dump
119
+
120
+
Print the last eight hexadecimal bytes of the Unique Serial ID on the Stream.
121
+
122
+
```c
123
+
voidUniqueID8dump(Stream);
124
+
```
125
+
82
126
Do you like this library? Please [star this project on GitHub](https://github.com/ricaun/ArduinoUniqueID/stargazers)!
sentence=Arduino Library to get the AVR microcontroler Unique ID / Manufacture Serial Number.
6
-
paragraph=The ArduinoUniqueID Library use the buildin feature to select the manufacture serial number from the microcontroler. Suported / Tested microcontroler: Atmega328pb, Atmega328p, Atmega2560 & Attiny85.
6
+
paragraph=The ArduinoUniqueID Library use the buildin feature to select the manufacture serial number from the microcontroler. Suported microcontroler: Atmega328pb, Atmega328p, Atmega2560, Attiny85, ESP8266 & ESP32.
0 commit comments