Skip to content

Commit

Permalink
Attiny85 Suport
Browse files Browse the repository at this point in the history
Add suport to attiny85
Add UniqueID8
  • Loading branch information
ricaun committed Mar 28, 2019
1 parent 072bcbd commit 08618b1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ This library only works on AVR Microcontroller.
* Atmega328pb - 10 bytes
* Atmega328p - 9 bytes
* Atmega2560 - 9 bytes
* Attiny85 - 9 bytes

## Installation

* Install the library by [Importing the .zip library](https://www.arduino.cc/en/Guide/Libraries#toc4) using either the [master](https://github.com/ricaun/ArduinoUniqueID/archive/master.zip) or one of the [releases](https://github.com/ricaun/ArduinoUniqueID/releases) ZIP files.
* Install the library by [Using the Library Manager](https://www.arduino.cc/en/Guide/Libraries#toc3)
* **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.

## Examples

Expand Down Expand Up @@ -68,4 +70,13 @@ Print the hexadecimal bytes of the Unique Serial ID on the Stream.
void UniqueIDdump(Stream);
```
### Variable: UniqueID8
UniqueID8 has the last 8 bytes array of the Unique Serial ID.
```c
for(size_t i = 0; i < 8; i++)
Serial.println(UniqueID8[i], HEX);
```

Do you like this library? Please [star this project on GitHub](https://github.com/ricaun/ArduinoUniqueID/stargazers)!
2 changes: 2 additions & 0 deletions keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ UniqueIDdump KEYWORD2
# Constants (LITERAL1)
#######################################

UniqueID8 LITERAL1
UniqueID LITERAL1
UniqueIDsize LITERAL1
6 changes: 3 additions & 3 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name=ArduinoUniqueID
version=1.0.2
version=1.0.3
author=Luiz Henrique Cassettari
maintainer=Luiz Henrique Cassettari <[email protected]>
sentence=Arduino Unique Device ID Library.
paragraph=Arduino Unique Device ID Library.
sentence=Arduino Library to get the AVR microcontroler Unique ID / Manufacture Serial Number.
paragraph=The ArduinoUniqueID Library use the buildin feature to select the manufacture serial number from the microcontroler. Suported / Tested microcontroler: Atmega328pb, Atmega328p, Atmega2560 & Attiny85.
category=Other
url=https://github.com/ricaun/ArduinoUniqueID
architectures=avr
Expand Down
3 changes: 3 additions & 0 deletions src/ArduinoUniqueID.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

#if __AVR_ARCH__
#include <avr/boot.h>
#ifndef SIGRD
#define SIGRD 5
#endif
#else
#error "ArduinoUniqueID only works on AVR Architecture"
#endif
Expand Down

0 comments on commit 08618b1

Please sign in to comment.