Skip to content

Instantly share code, notes, and snippets.

View AgustinParmisano's full-sized avatar
🏠
Working from home

Agustin Parmisano AgustinParmisano

🏠
Working from home
View GitHub Profile
//Measuring AC mains energy use the non-invasive current transformer method
//Arduino can receive serial value to open and close relay and set max AC to
// permit flows through relay and sensor (1-30A)
//Using acs712 (30A), its a invasive sensor (non-inductive)
//Based on OpenEnergyMonitor.org, Trystan Lea project
//Sketch calculates - Irms and Apparent power based on static voltage. SetV
// needs to be set below.
//Green IT project licenced under GNU General Public Licence
//Author: Mateo Durante
@AgustinParmisano
AgustinParmisano / Hj0S-0.py
Created May 6, 2017 00:19
null created by agustinparmisano - https://repl.it/Hj0S/0
print "hola mundo"
#!/usr/bin/python
import pattern.es
dict = {}
lista = []
parrafo = "Yo buscaba en el buscador buscando busco"
parrafo_split = parrafo.split(" ")
@AgustinParmisano
AgustinParmisano / read_string_led.io
Created April 7, 2017 16:59
serial read string led blink
String readString;
String secret = "led";
String on = "on";
String off = "off";
int led = 13;
void setup() {
Serial.begin(9600);
Serial.println("Insert the password to blink the led!!");
def int_to_bit(n):
aux = "{0:b}".format(n)
print(aux)
@AgustinParmisano
AgustinParmisano / ldr_simple_test.ino
Created March 16, 2017 22:30
Ldr sensor local simple tested
int pinLDR = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
delay(200);

ESP8266 Web Server to storing ap config to EEPROM.

Original by chriscook8 from esp8266.com I just modified to use ESP8266WebServer library for easy to handle the http request.

This is sample code not yet complete.

Todo

  • when Wifi connected need to close the softAP.
#include "picoapi.h"
static int uart = 1;
int main(void)
{
/*Configuración Inicial*/
setup();
}
from ubidots import ApiClient
from gpiozero import LightSensor
import time
import datetime
import Adafruit_DHT
import smbus
import os
loop = 0
startuptime = datetime.datetime.now()
from ubidots import ApiClient
from gpiozero import LightSensor
import time
import datetime
import Adafruit_DHT
ldr = LightSensor(4)
while True: