(clicca la bandierina verde)
Arduino al Coder Dojo Ticino
Metto qui le slide che userò domani al Coder Dojo Ticino. Partiremo seguendo i capitoli 1 e 2 del libro dei progetti dello Starter Kit per prendere confidenza col mezzo, e proseguiremo con Scratchbot che è una versione appositamente modificata di Scratch per interagire con Arduino.
Tra parentesi: oggi è il compleanno di questo blogghettino, nato il 7 novembre 2001. 3.169 post, e non mi sono ancora stufato.
ADSL Telecom Italia: la meravigliosa qualità della connessione
Un mese fa mi è arrivato a casa a Como lo scatolino di Sam Knows, un servizio che cerca di misurare il più accuratamente possibile le reali prestazioni dei fornitori di accesso internet nel mondo. I grafici del primo mese di utilizzo non sono incoraggianti.
What is ‘UDP Packet Loss’?
Packet loss is relatively rare in modern networks [e infatti]. That said, some broadband providers have been known to suffer high packet loss at peak times. If this is the case for your ISP, you may find that time sensitive applications such as Voice over IP (VoIP) and online gaming will suffer. Packet loss is recorded as a percentage; lower is better.

What is ‘UDP Latency’?
This test measures how long it takes one packet to be sent to one of our test servers and then return back to you. This can effectively be thought of as the responsiveness of the connection between your home and our servers on the Internet. Times are recorded in milliseconds; lower is better.

Per la cronaca, ho una connessione Alice 20 Mega che da qualche mese (da quando a Como hanno messo la fibra fino al marciapiede?) funziona al massimo nominale, mentre l’anno scorso viaggiava tra gli 11 e i 14 Mbit in download.
Ci sarebbe l’offerta tuttofibra che promette 30Mb in download e 3Mb in upload nominali, anche se ovviamente “l’effettiva velocità dipende da molteplici e variabili fattori tecnici”. Offerta che potrei anche considerare se riguardasse solo la connessione. Ma invece viene assieme a un sacco di altre cose che non mi interessano:
- il telefono VoIP che ho già Skype, grazie
- le chiamate gratuite illimitate ma non più di 50 minuti al giorno
- I telefoni cordless “a solo 1€” ma se disdici il contratto li paghi 50€
- Internet Pay “per acquistare online contenuti digitali con addebito sul conto (Telecom Italia, ho da darvi una brutta notizia: c’è già PayPal)
Quindi per ora soprassiedo, aspettando che la perdita di pacchetti UDP scenda a 0 e che la latenza media si attesti sotto i 10ms.
iBeacon trials and errors
- Selected users of the American Airlines app will be sent messages aimed primarily at guiding them round the airport. This will include information about walking time to gates and boarding updates.
American Airlines says that 65% of passengers arrive at their gate early because they are worried about being late or getting lost.- Tesco’s trial began earlier this year in its Chelmsford store. It has said that the technology won’t be used to push out marketing messages, but will instead notify shoppers that their pre-ordered goods are waiting for them.
Ultimately iBeacons could be a central feature in Tesco’s new beta MyStore app, helping customers to find specific items in-store.
And errors:
-
Initially launched with just 100 users, the trial involved sending marketing messages to customers as they entered one of Eat’s stores.
-
The technology enabled fans at 20 baseball stadiums to check-in at games and receive exclusive offers.
-
Virgin passengers with an electronic boarding pass loaded in their iPhone Passbook app could receive messages relevant to their location within the airport.
-
For example, passengers in the departures section of the airport would be sent special offers such as a commission-free currency exchange.
-
In June Odeon Cinemas announced that it planned to imminently begin trials with iBeacons to welcome people to its cinemas, share information and inform them of special offers.
There is no demand for messages. (*)
Da Arduino a MySQL: ho aggiunto la temperatura esterna

Dato che Yahoo Weather offre il feed della situazione meteo della mia città, ho deciso di aggiungere questi dati al mio database, in modo da avere sia la temperatura interna che quella esterna. Ho quindi modificato il codice in Python aggiungendo queste righe:
from xml.dom.minidom import *
import urllib
import csv
LocationID = '714505'
# Fetch weather XML for Como, Italy
Trier = urllib.urlopen('http://weather.yahooapis.com/forecastrss?w=' + LocationID + '&u=c').read()
# Parse the XML
Trier = parseString(Trier)
# Get date
Date = Trier.getElementsByTagName('lastBuildDate')[0].firstChild.data
# Get today's weather
Today = Trier.getElementsByTagName('yweather:condition')[0]
T = Today.attributes["temp"].value
W = Today.attributes["text"].value
#print(W,T)
Se vuoi divertirti anche tu, ho messo online il nuovo arduinotomysql.py con le relative modifiche.
Tra parentesi, questa sera canto nel coro alla prima della Cavalleria Rusticana che dovrebbe tenersi all’aperto nell’Arena del teatro Sociale. In questo momento splende il sole, ma si prevede nuvolo con occasionali piogge. Incrocio le dita.

