Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart committed Jan 22, 2024
1 parent 06ae576 commit b5d64a6
Show file tree
Hide file tree
Showing 17 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion examples/ACS712_20_AC_DEMO/ACS712_20_AC_DEMO.ino
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ void loop()
}


// -- END OF FILE --
// -- END OF FILE --

Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ void loop()
}


// -- END OF FILE --
// -- END OF FILE --
4 changes: 2 additions & 2 deletions examples/ACS712_20_AC_average/ACS712_20_AC_average.ino
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void loop()
uint32_t start = millis();
for (int i = 0; i < 100; i++)
{
// select sppropriate function
// select appropriate function
// average += ACS.mA_AC_sampling();
average += ACS.mA_AC();
}
Expand All @@ -56,4 +56,4 @@ void loop()
}


// -- END OF FILE --
// -- END OF FILE --
2 changes: 1 addition & 1 deletion examples/ACS712_20_AC_compare/ACS712_20_AC_compare.ino
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ void loop()
}


// -- END OF FILE --
// -- END OF FILE --
10 changes: 5 additions & 5 deletions examples/ACS712_20_AC_low_pass/ACS712_20_AC_low_pass.ino
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ void setup()
Serial.print("Amp/Step: ");
Serial.println(ACS.getAmperePerStep(), 4);

value = ACS.mA_AC(); // get good initial value
value = ACS.mA_AC(); // get good initial value
}


void loop()
{
// select sppropriate function
// select appropriate function
float mA = ACS.mA_AC_sampling();
// float mA = ACS.mA_AC();
value += weight * (mA - value); // low pass filtering
// float mA = ACS.mA_AC();
value += weight * (mA - value); // low pass filtering

Serial.print("weight: ");
Serial.print(weight);
Expand All @@ -61,4 +61,4 @@ void loop()
}


// -- END OF FILE --
// -- END OF FILE --
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ void loop()
}


// -- END OF FILE --
// -- END OF FILE --
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ void loop()
}


// -- END OF FILE --
// -- END OF FILE --
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ void loop()
}


// -- END OF FILE --
// -- END OF FILE --
5 changes: 3 additions & 2 deletions examples/ACS712_20_DC/ACS712_20_DC.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
// AUTHOR: Rob Tillaart
// PURPOSE: demo to measure mA DC
// URL: https://github.com/RobTillaart/ACS712

//
// use with Arduino Serial Plotter


#include "ACS712.h"


Expand Down Expand Up @@ -41,4 +42,4 @@ void loop()
}


// -- END OF FILE --
// -- END OF FILE --
2 changes: 1 addition & 1 deletion examples/ACS712_20_DC_DEMO/ACS712_20_DC_DEMO.ino
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ void loop()
}


// -- END OF FILE --
// -- END OF FILE --

Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
// AUTHOR: Rob Tillaart
// PURPOSE: demo to measure mA DC with external ADC
// URL: https://github.com/RobTillaart/ACS712

//
// see also ACS712_ESP32_external_ADC.ino

// use with Arduino Serial Plotter

#include "ACS712.h"
Expand Down Expand Up @@ -56,4 +55,4 @@ uint16_t testADC(uint8_t p)
}


// -- END OF FILE --
// -- END OF FILE --
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ void loop()
}


// -- END OF FILE --
// -- END OF FILE --
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ void loop()
}


// -- END OF FILE --
// -- END OF FILE --
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define SENSOR_ACS712_ADSPIN 1


// explicit params for demo
// explicit parameters for demo
ADS1015 ads1015(ADS1015_ADDRESS, &Wire); // ADS1015 == 12 bit


Expand Down
6 changes: 3 additions & 3 deletions examples/ACS712_I2C_display/ACS712_I2C_display.ino
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ void setup()
Serial.print("ACS712_LIB_VERSION: ");
Serial.println(ACS712_LIB_VERSION);

Wire.begin();

lcd.begin(16, 2);
lcd.setBacklightPin(BACKLIGHT_PIN, POSITIVE);
lcd.setBacklight(BL_ON);

lcd.clear();


ACS.autoMidPoint();

}


Expand All @@ -87,4 +87,4 @@ void loop()
}


// -- END OF FILE --
// -- END OF FILE --
2 changes: 1 addition & 1 deletion examples/ACS712_detectFrequency/ACS712_detectFrequency.ino
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ void loop()
}


// -- END OF FILE --
// -- END OF FILE --

2 changes: 1 addition & 1 deletion examples/RMS_by_sampling/RMS_by_sampling.ino
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ float mA_AC_sampling(float frequency, float mVperStep, float mVperAmpere, uint8_
}


// -- END OF FILE --
// -- END OF FILE --

0 comments on commit b5d64a6

Please sign in to comment.