diff --git a/libraries/AsyncAnalog/AsyncAnalog.cpp b/libraries/AsyncAnalog/AsyncAnalog.cpp index 4fae84b6..11dd1f3b 100644 --- a/libraries/AsyncAnalog/AsyncAnalog.cpp +++ b/libraries/AsyncAnalog/AsyncAnalog.cpp @@ -1,7 +1,7 @@ // // FILE: AsyncAnalog.cpp // AUTHOR: Rob Tillaart -// VERSION: 0.1.3 +// VERSION: 0.1.5 // DATE: 2018-09-05 // PURPOSE: async version of analogRead, prevent blocking wait // @@ -14,6 +14,7 @@ // 0.1.2 2020-05-27 update library.json // 0.1.3 2020-12-12 added Arduino CI, minor fixes // 0.1.4 2020-12-12 update Arduino CI, minor fixes +// 0.1.5 2021-12-13 update library.json, license, readme #include "AsyncAnalog.h" diff --git a/libraries/AsyncAnalog/AsyncAnalog.h b/libraries/AsyncAnalog/AsyncAnalog.h index 74ec08c7..a4788664 100644 --- a/libraries/AsyncAnalog/AsyncAnalog.h +++ b/libraries/AsyncAnalog/AsyncAnalog.h @@ -2,7 +2,7 @@ // // FILE: AsyncAnalog.h // AUTHOR: Rob Tillaart -// VERSION: 0.1.4 +// VERSION: 0.1.5 // DATE: 2018-09-05 // PURPOSE: async version of analogRead for AVR // URL: https://github.com/RobTillaart/AsyncAnalog @@ -11,7 +11,7 @@ #if !defined(ARDUINO_ARCH_AVR) - #error “AsyncAnalog library 0.1.3 only supports boards with an AVR processor .” + #error “AsyncAnalog library only supports boards with an AVR processor .” #else @@ -22,7 +22,7 @@ #include "wiring_private.h" #include "pins_arduino.h" -#define ASYNCANALOG_LIB_VERSION (F("0.1.4")) +#define ASYNCANALOG_LIB_VERSION (F("0.1.5")) class AsyncAnalog diff --git a/libraries/AsyncAnalog/LICENSE b/libraries/AsyncAnalog/LICENSE index 0feff1d7..2ede7a75 100644 --- a/libraries/AsyncAnalog/LICENSE +++ b/libraries/AsyncAnalog/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018-2021 Rob Tillaart +Copyright (c) 2018-2022 Rob Tillaart Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/libraries/AsyncAnalog/README.md b/libraries/AsyncAnalog/README.md index bfac8182..142462bb 100644 --- a/libraries/AsyncAnalog/README.md +++ b/libraries/AsyncAnalog/README.md @@ -8,7 +8,7 @@ # AsyncAnalog -Arduino Library for async reading of an analogue pin. **\[AVR ONLY\]** +Arduino Library for async reading of an analogue pin. **\[AVR ONLY\]**. ## Description @@ -25,26 +25,30 @@ The library works only for AVR boards now, other platforms might be supported in As the UNO has only one ADC that is multiplexed, one can only read one analogue pin in async way simultaneously. +**Use with care** + ## Interface - **AsyncAnalog(uint8_t pin)** constructor, defines the analogue pin to use. - **void start()** triggers a new ADC reading. -- **bool ready()** returns true if sample is complete -- **int value()** returns the value +- **bool ready()** returns true if sample is complete. +- **int value()** returns the value. ## Operation The example **asyncAnalogTest2.ino** shows a loop of 1000 analogReads and prints -over Serial at 115200 baud. The async test does this in less time. Note that faster -baud rates shows an even bigger difference. - -During the printing, the sampling continues. +over Serial at 115200 baud. ## Future +- improve documentation. +- investigate the performance gain. + - asyncAnalogTest2.ino is no good test. +- create examples + - real world examples preferred. - investigate other platforms - fall back to normal analogRead for non AVR platforms ? - diff --git a/libraries/AsyncAnalog/examples/asyncAnalogTest/asyncAnalogTest.ino b/libraries/AsyncAnalog/examples/asyncAnalogTest/asyncAnalogTest.ino index 0a585fc2..cf74d0f5 100644 --- a/libraries/AsyncAnalog/examples/asyncAnalogTest/asyncAnalogTest.ino +++ b/libraries/AsyncAnalog/examples/asyncAnalogTest/asyncAnalogTest.ino @@ -14,6 +14,7 @@ uint32_t start = 0; uint32_t duration = 0; uint16_t count = 0; + void setup() { Serial.begin(115200); @@ -53,3 +54,4 @@ void loop() // -- END OF FILE -- + diff --git a/libraries/AsyncAnalog/library.json b/libraries/AsyncAnalog/library.json index 8a67c850..e12ce2d8 100644 --- a/libraries/AsyncAnalog/library.json +++ b/libraries/AsyncAnalog/library.json @@ -15,8 +15,9 @@ "type": "git", "url": "https://github.com/RobTillaart/AsyncAnalog.git" }, - "version": "0.1.4", + "version": "0.1.5", "license": "MIT", "frameworks": "arduino", - "platforms": "*" + "platforms": "*", + "headers": "AsyncAnalog.h" } diff --git a/libraries/AsyncAnalog/library.properties b/libraries/AsyncAnalog/library.properties index a56ba11e..ce640278 100644 --- a/libraries/AsyncAnalog/library.properties +++ b/libraries/AsyncAnalog/library.properties @@ -1,5 +1,5 @@ name=AsyncAnalog -version=0.1.4 +version=0.1.5 author=Rob Tillaart maintainer=Rob Tillaart sentence=Arduino Library for async reading of an analog pin