( ! ) Warning: Declaration of Suffusion_MM_Walker::start_el(&$output, $item, $depth, $args) should be compatible with Walker_Nav_Menu::start_el(&$output, $item, $depth = 0, $args = NULL, $id = 0) in /var/www/public/arduino/wp-content/themes/suffusion/library/suffusion-walkers.php on line 39
Call Stack
#TimeMemoryFunctionLocation
10.0002342720{main}( ).../index.php:0
20.0003344408require( '/var/www/public/arduino/wp-blog-header.php' ).../index.php:17
30.609126855640require_once( '/var/www/public/arduino/wp-includes/template-loader.php' ).../wp-blog-header.php:19
40.611726870168include( '/var/www/public/arduino/wp-content/themes/suffusion/single.php' ).../template-loader.php:98
50.611726870168get_header( ).../single.php:6
60.611726870440locate_template( ).../general-template.php:41
70.611826870520load_template( ).../template.php:671
80.612026882280require_once( '/var/www/public/arduino/wp-content/themes/suffusion/header.php' ).../template.php:722
90.615826892424wp_head( ).../header.php:50
100.615826892424do_action( ).../general-template.php:2879
110.615826892696WP_Hook->do_action( ).../plugin.php:478
120.615826892696WP_Hook->apply_filters( ).../class-wp-hook.php:312
130.628126937088Suffusion_Framework->specific( ).../class-wp-hook.php:288
140.628326937280require_if_theme_supports( ).../framework.php:230
ian. 022013
 

acs

int VQ;
int ACSPin = A2;
void setup() {
Serial.begin(9600);
VQ = determineVQ(ACSPin); //Quiscent output voltage – the average voltage ACS712 shows with no load (0 A)
delay(1000);
}

void loop() {
Serial.print(„ACS712@A2:”);Serial.print(readCurrent(ACSPin),3);Serial.println(” mA”);
delay(150);
}

int determineVQ(int PIN) {
Serial.print(„estimating avg. quiscent voltage:”);
long VQ = 0;
//read 5000 samples to stabilise value
for (int i=0; i<5000; i++) {
VQ += analogRead(PIN);
delay(1);//depends on sampling (on filter capacitor), can be 1/80000 (80kHz) max.
}
VQ /= 5000;
Serial.print(map(VQ, 0, 1023, 0, 5000));Serial.println(” mV”);
return int(VQ);
}

float readCurrent(int PIN) {
int current = 0;
int sensitivity = 185.0;//change this to 100 for ACS712-20A or to 66 for ACS712-30A
//read 5 samples to stabilise value
for (int i=0; i<5; i++) {
current += analogRead(PIN) – VQ;
delay(1);
}
current = map(current/5, 0, 1023, 0, 5000);
return float(current)/sensitivity;
}

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(necesar)

(required)