La famiglia Torriero augura a te personalmente un felice anno nuovo, e ti ringrazia per la visita.
Marco Leo Alejandro Matteo Alessandro Gaspar
Elena Renata Elena Anna Pietro Elena
Fiona

It's more complicated than that!
Dopo l’albero di Natale con Scratch, ecco le luci di Natale con Arduino:
Il relativo codice (migliorabilissimo):
/* Arrays Demonstrates the use of an array to hold pin numbers in order to iterate over the pins in a sequence. Lights multiple LEDs in sequence, then in reverse. Unlike the For Loop tutorial, where the pins have to be contiguous, here the pins can be in any random order. The circuit: * LEDs from pins 3 through 11 to ground created 2006 by David A. Mellis modified 30 Aug 2011 by Tom Igoe modified 08 Dec 2014 by Gaspar Torriero The original code is in the public domain. http://www.arduino.cc/en/Tutorial/Array */ int N; int timer = 100; // The higher the number, the slower the timing. int selector = 4; int ledPins0[] = { 3, 4, 5, 6, 7, 8, 9, 10, 11}; // an array of pin numbers to which LEDs are attached int ledPins1[] = { 3, 6, 9, 4, 7, 10, 5, 8, 11}; // an array of pin numbers to which LEDs are attached int ledPins2[] = { 3, 11, 4, 10, 5, 9, 6, 8, 7}; // an array of pin numbers to which LEDs are attached int ledPins3[] = { 3, 5, 7, 9, 11, 4, 6, 8, 10}; // an array of pin numbers to which LEDs are attached int pinCount = 9; // the number of pins (i.e. the length of the array) void setup() { for (int N = 3; N < 12; N++) { pinMode(N,OUTPUT); } } void loop() { timer = analogRead(A0); // one of the next two lines must be uncommented selector = (analogRead(A1) / 255); // knob-selected status //selector = random(3); //random status if (selector == 0) { // loop from the lowest pin to the highest: for (int thisPin = 0; thisPin < pinCount; thisPin++) { // turn the pin on: digitalWrite(ledPins0[thisPin], HIGH); delay(timer); // turn the pin off: digitalWrite(ledPins0[thisPin], LOW); } // loop from the highest pin to the lowest: for (int thisPin = pinCount - 1; thisPin >= 0; thisPin--) { // turn the pin on: digitalWrite(ledPins0[thisPin], HIGH); delay(timer); // turn the pin off: digitalWrite(ledPins0[thisPin], LOW); } } else if (selector == 1) { // loop from the lowest pin to the highest: for (int thisPin = 0; thisPin < pinCount; thisPin++) { // turn the pin on: digitalWrite(ledPins1[thisPin], HIGH); delay(timer); // turn the pin off: digitalWrite(ledPins1[thisPin], LOW); } // loop from the highest pin to the lowest: for (int thisPin = pinCount - 1; thisPin >= 0; thisPin--) { // turn the pin on: digitalWrite(ledPins1[thisPin], HIGH); delay(timer); // turn the pin off: digitalWrite(ledPins1[thisPin], LOW); } } if (selector == 2) { // loop from the lowest pin to the highest: for (int thisPin = 0; thisPin < pinCount; thisPin++) { // turn the pin on: digitalWrite(ledPins2[thisPin], HIGH); delay(timer); // turn the pin off: digitalWrite(ledPins2[thisPin], LOW); } // loop from the highest pin to the lowest: for (int thisPin = pinCount - 1; thisPin >= 0; thisPin--) { // turn the pin on: digitalWrite(ledPins2[thisPin], HIGH); delay(timer); // turn the pin off: digitalWrite(ledPins2[thisPin], LOW); } } else if (selector == 3) { // loop from the lowest pin to the highest: for (int thisPin = 0; thisPin < pinCount; thisPin++) { // turn the pin on: digitalWrite(ledPins3[thisPin], HIGH); delay(timer); // turn the pin off: digitalWrite(ledPins3[thisPin], LOW); } // loop from the highest pin to the lowest: for (int thisPin = pinCount - 1; thisPin >= 0; thisPin--) { // turn the pin on: digitalWrite(ledPins3[thisPin], HIGH); delay(timer); // turn the pin off: digitalWrite(ledPins3[thisPin], LOW); } } }
(clicca la bandierina verde)
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.
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:
Quindi per ora soprassiedo, aspettando che la perdita di pacchetti UDP scenda a 0 e che la latenza media si attesti sotto i 10ms.