Program for reading data from one (or two) ACS712 (current sense amplifier). Read the configuration before trying it.

Dependencies:   mbed

You are viewing an older revision! See the latest version

Homepage

This program aims at implementing a simple current reader which, sensing from an ACS712, prints on the USB port the average of n samples.

The program can be configured at compile-time by setting few defines:

  • the number of channels: either only p20 or the sum of p19 and p20;
  • the number of samples to read before printing their average
  • the operating mode:
    • PIN_TRIGGERED: read a handful of samples when the pin p9 rises
    • USER_TRIGGERED: start reading when the user presses the character 's'
    • ENDLESS_READ: read continuosly

All wikipages