An easy-to-use Arduino library for ACS712 current sensors.
Supports 5A, 20A, and 30A versions with automatic calibration and both DC and AC (RMS) current reading.
- Download this repo as
.zip - In Arduino IDE → Sketch → Include Library → Add .ZIP Library
#include "ACS712Simple.h"
ACS712_30A sensor(A0);
void setup() {
Serial.begin(9600);
sensor.calibrate(); // run with no load
}
void loop() {
float current = sensor.readAC();
Serial.println(current);
}