Dillo in giro ma senza farti accorgere: mercoledì 15 febbraio ore 20:00 al birrificio di Como torna il ComoBlog.
Per maggiori informazioni scrivi a Elena (photo@elenatrombetta.it) e dille che ti mando io.
{ 0 comments }
Dillo in giro ma senza farti accorgere: mercoledì 15 febbraio ore 20:00 al birrificio di Como torna il ComoBlog.
Per maggiori informazioni scrivi a Elena (photo@elenatrombetta.it) e dille che ti mando io.
{ 0 comments }
Il mio Arduino è raggiungibile via web e adesso ti permette di accendere o spegnere la luce del mio comodino. Al pomeriggio batte il sole e quindi potresti non accorgerti della differenza.
Il codice funziona ma non ancora bene, sospetto qualche problema di logica: se accedo dal PC accende e subito spegne; se accedo da telefono ci vogliono due clic per spegnere. Cosa sarà?
Dopo il salto, metto il codice che terrò aggiornato all’ultima versione. Se sei capace e hai qualche suggerimento da darmi, te ne sarò immensamente grato.
{ 4 comments }
Gustav Leonhardt (‘s-Graveland, 30 maggio 1928 – Amsterdam, 16 gennaio 2012)
Inventore dell’esecuzione storica.
{ 1 comment }
Stimolato da questo incontro, ho preso qualche componente da Robot Italy (bravi e veloci), ho preso un DNS dinamico gratuito, e mi sono fatto la domotica più semplice e veloce possibile: il server della temperatura e della luce.
Il codice (che terrò aggiornato man mano che lo modifico):
/* Web Server Temp A simple web server that shows the value of the analog input pins. using an Arduino Wiznet Ethernet shield. Circuit: * Ethernet shield attached to pins 10, 11, 12, 13 * Analog inputs attached to pins A0 through A5 (optional) created 18 Dec 2009 by David A. Mellis modified 4 Sep 2010 by Tom Igoe modified 15 jan 2012 by Gaspar Torriero */ #include <SPI.h> #include <Ethernet.h> int pagine = 0; int inPin = 0; // Pin di lettura int temp = 0; // variabile temperatura int luce = 0; //variabile luce // Enter a MAC address and IP address for your controller below. // The IP address will be dependent on your local network: byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; IPAddress ip(192,168,30, 177); // Initialize the Ethernet server library // with the IP address and port you want to use // (port 80 is default for HTTP): EthernetServer server(80); void setup() { // start the Ethernet connection and the server: pinMode(9, OUTPUT); Ethernet.begin(mac, ip); server.begin(); } void loop() { digitalWrite(9, LOW); // set the LED off temp = ( 5.0 * analogRead(inPin) * 100.0) / 1024.0; // Conversione voltaggio sensore in temperatura luce = (analogRead(5) * 10000.0) / 1024.0; //Conversione voltaggio sensore in Lux // listen for incoming clients EthernetClient client = server.available(); if (client) { // an http request ends with a blank line boolean currentLineIsBlank = true; while (client.connected()) { if (client.available()) { char c = client.read(); // if you've gotten to the end of the line (received a newline // character) and the line is blank, the http request has ended, // so you can send a reply if (c == '\n' && currentLineIsBlank) { // send a standard http response header client.println("HTTP/1.1 200 OK"); client.println("Content-Type: text/html"); client.println(); client.print("<html><head><title>Gasparduino Web Server Ver. 0.3</title><meta http-equiv='Content-Type' content='text/html; charset=utf-8' ></head><body>"); // output the value of analog input pins client.print("<h1>Gaspar Torriero gone Arduino</h1><hr />"); client.println("<br />"); client.print("Temperatura corrente: "); client.print(temp); client.print("°C"); client.println("<br />"); client.print("La luce è "); if (luce > 300) { client.print("accesa."); } else { client.print("spenta."); } client.println("<br />"); pagine=pagine+1; client.print("Visite dall'ultimo riavvio: "); client.print(pagine); client.println("</body></html>"); break; } if (c == '\n') { // you're starting a new line currentLineIsBlank = true; } else if (c != '\r') { // you've gotten a character on the current line currentLineIsBlank = false; } } } // give the web browser time to receive the data delay(1); // close the connection: client.stop(); digitalWrite(9, HIGH); // set the LED on delay(300); // wait for a sec digitalWrite(9, LOW); // set the LED off delay(300); // wait for a sec } }
{ 5 comments }
Ieri il alla Avery Fisher Hall il direttore Alan Gilbert, mentre dirigeva il finale della Nona di Mahler, si è visto costretto a fermare l’orchestra a causa di a) la sveglia di un iPhone scattata durante i pianissimi finali e b) il deficiente proprietario che prima non si è accorto che si trattava del suo telefono, e poi continuava a premere snooze invece di stop.
La cronaca dell’incredibile evento è qui, assieme ai commenti di chi c’era. Quote of note:
Mr. Gilbert asked the man, sitting in front of the concert-master: “Are you finished?” The man didn’t respond.“Fine, we’ll wait,” Mr. Gilbert said.The Avery Fisher Hall audience, ripped in an untimely fashion from Mahler’s complicated sound-world, reacted with “seething rage.” Someone shouted “Thousand dollar fine.”This was followed by cries of ‘Get out!’ and ‘Kick him out!.’ Some people started clapping rhythmically but the hall was quieted down. House security did not intervene or remove the offender.The ringing stopped. “Did you turn it off?” Mr. Gilbert asked.The man nodded.“It won’t go off again?”The man shook his head.
Tempo fa a Brescia Andras Schiff dovette sospendere un recital bachiano perché in una piazza vicina si stava esibendo Lucio Dalla e la potenza degli amplificatori gli faceva ballare il pianoforte. Provò a resistere qualche minuto, ma poi si alzò e disse “Scusate, non ce la faccio” e se ne andò.
Un’altra volta al Conservatorio di Milano una sonata per violoncello e pianoforte di musica contemporanea (non ricordo l’autore) venne sospesa perché il pianista aveva sbagliato a impaginare il suo spartito: quando Misha Maisky se ne accorse, si interruppe e fulminò il pianista con una occhiataccia allo zolfo; ma in platea non se ne era accorto nessuno.
{ 3 comments }