first commit
This commit is contained in:
33
current_only/current_only.ino
Normal file
33
current_only/current_only.ino
Normal file
@@ -0,0 +1,33 @@
|
||||
// EmonLibrary examples openenergymonitor.org, Licence GNU GPL V3
|
||||
|
||||
#include "EmonLib.h" // Include Emon Library
|
||||
EnergyMonitor emon1; // Create an instance
|
||||
EnergyMonitor emon2; // Create an instance
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(9600);
|
||||
|
||||
emon1.current(A0, 66); // Current: input pin, calibration.
|
||||
emon2.current(A1, 66); // Current: input pin, calibration.
|
||||
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
double Irms = emon1.calcIrms(1440); // Calculate Irms only
|
||||
Serial.print("General = ");
|
||||
|
||||
// emon1.serialprint(); // Print out all variables (realpower, apparent power, Vrms, Irms, power factor)
|
||||
Serial.println(Irms*230.0 -7); // Apparent power
|
||||
// Serial.print(" ");
|
||||
// Serial.println(Irms); // Irms
|
||||
delay(2000);
|
||||
Serial.print("Solaire = ");
|
||||
Irms = emon2.calcIrms(5000); // Calculate Irms only
|
||||
// emon1.serialprint(); // Print out all variables (realpower, apparent power, Vrms, Irms, power factor)
|
||||
Serial.println(Irms*230.0 -7); // Apparent power
|
||||
// Serial.print(" ");
|
||||
// Serial.println(Irms); // Irms
|
||||
delay(2000);
|
||||
}
|
||||
Reference in New Issue
Block a user