Skip to content

Conversation

@oferreiro
Copy link

@oferreiro oferreiro commented Feb 2, 2019

I had some problems to use your library with PJON and some buttons. Mostly if it use large READINGS_NUMBER.
So, it is a implementation of timed buffer to store analog reads.
It avoid use of delay in read routines and free micro controller to do another tasks.

store analog port timed readings, instead of delay interruptions.

  public:
    Update
    isReading
    setUseDelay
    startRead
  private:
    initBuffer
    readBuffer

Added variables
    bool useDelay;
    double *analogBuffer;
    unsigned int bufferId;
    long lastRead;
    bool enableRead;

Added constructor to set delay or buffer option.
Added example to use this library without delay() interruptions.
Updated keywords.txt.
Removed unused volatile variables (it does not use interrupts).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant