Skip to content

Instantly share code, notes, and snippets.

@locy
locy / ACS712.ino
Created October 17, 2013 10:49
GY-712 電流傳感器, ACS712TELC-20A, ACS712TELC-30A, Arduino and ACS712 sample code
int VQ;
int ACSPin = 0;
void setup() {
Serial.begin(115200);
VQ = determineVQ(ACSPin); //Quiscent output voltage - the average voltage ACS712 shows with no load (0 A)
delay(1000);
}
void loop() {
@locy
locy / gist:4218089
Last active October 13, 2015 15:38 — forked from awojnowski/gist:2225816
Facebook Bootstrap Automater
<?php
function retrieve_graph($input) {
$json = file_get_contents('http://graph.facebook.com/' . $input);
$json = json_decode($json);
if (isset($json->error) || !$json) return null;
return $json;