11
22[ ![ Arduino CI] ( https://github.com/RobTillaart/AsyncAnalog/workflows/Arduino%20CI/badge.svg )] ( https://github.com/marketplace/actions/arduino_ci )
3+ [ ![ Arduino-lint] ( https://github.com/RobTillaart/AsyncAnalog/actions/workflows/arduino-lint.yml/badge.svg )] ( https://github.com/RobTillaart/AsyncAnalog/actions/workflows/arduino-lint.yml )
4+ [ ![ JSON check] ( https://github.com/RobTillaart/AsyncAnalog/actions/workflows/jsoncheck.yml/badge.svg )] ( https://github.com/RobTillaart/AsyncAnalog/actions/workflows/jsoncheck.yml )
35[ ![ License: MIT] ( https://img.shields.io/badge/license-MIT-green.svg )] ( https://github.com/RobTillaart/AsyncAnalog/blob/master/LICENSE )
46[ ![ GitHub release] ( https://img.shields.io/github/release/RobTillaart/AsyncAnalog.svg?maxAge=3600 )] ( https://github.com/RobTillaart/AsyncAnalog/releases )
57
8+
69# AsyncAnalog
710
8- Arduino Library for async reading of an analog pin. ** \[ AVR ONLY\] **
11+ Arduino Library for async reading of an analogue pin. ** \[ AVR ONLY\] **
912
1013
1114## Description
12- AsyncAnalog is a library to read the analog port in an asynchronous way.
15+
16+ AsyncAnalog is a library to read the analogue port of an AVR in an asynchronous way.
1317This means that the user must explicitly ** start** the ADC, check if it is ** ready**
1418and read out its ** value** .
1519
@@ -18,25 +22,30 @@ By using this class, the user prevents the (~112 uSec) blocking of the
1822
1923The library works only for AVR boards now, other platforms might be supported in the future.
2024
21- As the UNO has only one ADC that is multiplexed, one can only read one analog pin
25+ As the UNO has only one ADC that is multiplexed, one can only read one analogue pin
2226in async way simultaneously.
2327
24- ## Interface
2528
26- - ** AsyncAnalog(uint8_t pin)** constructor, defines the analog pin to use.
27-
28- The library consists of three main function:
29+ ## Interface
2930
31+ - ** AsyncAnalog(uint8_t pin)** constructor, defines the analogue pin to use.
3032- ** void start()** triggers a new ADC reading.
3133- ** bool ready()** returns true if sample is complete
3234- ** int value()** returns the value
3335
36+
3437## Operation
3538
3639The example ** asyncAnalogTest2.ino** shows a loop of 1000 analogReads and prints
3740over Serial at 115200 baud. The async test does this in less time. Note that faster
38- baudrates shows an even bigger difference.
41+ baud rates shows an even bigger difference.
3942
4043During the printing, the sampling continues.
4144
4245
46+ ## Future
47+
48+ - investigate other platforms
49+ - fall back to normal analogRead for non AVR platforms ?
50+ -
51+
0 commit comments