email 4 blackout
Post on 13-May-2015
71 Views
Preview:
DESCRIPTION
TRANSCRIPT
Rino Ragucci
Questa opera è pubblicata sottouna Licenza Creative Commons Attribuzione 3.0 Italia (CC BY NC ND 3.0)
Giffoni Open Makers Day
09/11/2013
EMAIL 4 BACK-UP
Intro
Come nasce l'idea? Approccio tradizionale vs making Abbassamento della soglia di difficoltà e
costo (hw in gran parte già disponibile) Incremento di know-how (tecnica R&D)
26/08/1991 - Linux
Prime tracce scritte
ARDUINOUNO
RELAY 5VSPDT
UPS Alimentatore 7V
SHIELDETHERNET
RJ45
Alimentatore 5.5V
NC
PIN2 Input digitale
NDCOM
S
GND
5V
+
--
+
-- --
+
PWR 220V AC soggetto a blackout
Modem ADSLLAN switch
GND
10 KOhm
100 Ohm
Architettura
Architettura
+Know how: relè
un interruttore che viene azionato da un elettromagnete
Relè 5V SPDT (Single Pole, Double Throw)
NC (Normally Connected) COM (Common) ND (Normally Disconnected)
Prima versione
Acquisto relay Realizzazione prima versione
sketch Funzionamento inaffidabile
+Know how: floating input
Problema: pin2 di input connesso a nulla quando relay passa nello stato dis-eccitato (black-out in atto)
Soluzione: pull down resistor
+Know how: debouncing
+Know how: debouncing in sw
void loop(){
int d; // read the state of the Input Pin: currentState= digitalRead(buttonPin); if (currentState != previousState){ d= debouncing(); if (d==1) changeStateHandler(); } previousState= currentState; //Serial.println(time); //6ms //delay(100);}
int debouncing(){ delay(100); previousState= currentState; currentState= digitalRead(buttonPin); if (currentState == previousState) return 1; else return 0;
}
+Know how: debouncing
+Know how: SMTP servers
Difficile oggi trovare SMTP server che accettino posta indipendentemente dal proprio provider della connessione (causa antispam)
Gmail: https
Possibili sviluppi futuri
reset Basetta millefori Porting su altro hw con web
server Sistema domotico multifunzione
Grazie per l'attenzione
Domande?
Saluti
top related