first commit
This commit is contained in:
19
PINCE_AMPERMETRIQUE_TEST/PINCE_AMPERMETRIQUE_TEST.ino
Normal file
19
PINCE_AMPERMETRIQUE_TEST/PINCE_AMPERMETRIQUE_TEST.ino
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "EmonLib.h"
|
||||
// Include Emon Library
|
||||
EnergyMonitor emon1;
|
||||
// Create an instance
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(9600);
|
||||
|
||||
emon1.current(A1, 111.1); // Current: input pin, calibration.
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
double Irms = emon1.calcIrms(1480); // Calculate Irms only
|
||||
Serial.print(Irms*230.0); // Apparent power
|
||||
Serial.print(" ");
|
||||
Serial.println(Irms); // Irms
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user