www.devoxx4kids.org manno, 17 maggio 2014. 2 celestino andrea gaspar giorgio serena
TRANSCRIPT
![Page 2: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/2.jpg)
www.devoxx4kids.org
Celestino
Andrea
Gaspar
Giorgio
Serena
![Page 3: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/3.jpg)
www.devoxx4kids.org
![Page 4: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/4.jpg)
www.devoxx4kids.org
Computers sono….
![Page 5: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/5.jpg)
www.devoxx4kids.org
…ma non solo!
Oggi molti gli apparecchi contengono un microcontroller che esegue un programma (software).
![Page 6: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/6.jpg)
www.devoxx4kids.org
http://arduino.cc
Massimo Banzi
http://it.wikipedia.org/wiki/Open_Source
http://creativecommons.org/licenses/by-sa/3.0/it/
![Page 7: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/7.jpg)
www.devoxx4kids.org
Alimentazionesistema
![Page 8: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/8.jpg)
www.devoxx4kids.org
Alimentazionecomponenti
![Page 9: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/9.jpg)
www.devoxx4kids.org
Microcontroller
![Page 10: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/10.jpg)
www.devoxx4kids.org
Entrate (Input) analogiche
![Page 11: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/11.jpg)
www.devoxx4kids.org
Entrate (Input) e uscite (Output)digitali
![Page 12: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/12.jpg)
www.devoxx4kids.org
USB
![Page 13: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/13.jpg)
www.devoxx4kids.org
Reset
![Page 14: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/14.jpg)
www.devoxx4kids.org
Attuatori(Output)
Sensori(Input)
Software(Logica)
+ +
+ +
![Page 15: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/15.jpg)
www.devoxx4kids.org
![Page 16: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/16.jpg)
www.devoxx4kids.org
1.Cablaggio elettronico (hardware)
2.Programmazione (software)
3.Trasferimento del software sull’Arduino e verifica del funzionamento
![Page 17: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/17.jpg)
www.devoxx4kids.org
Attuatori:LED
Attuatori:cicalino
Sensore:fotoresistenza
Breadboard
![Page 18: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/18.jpg)
www.devoxx4kids.org
Breadboard
![Page 19: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/19.jpg)
www.devoxx4kids.org
![Page 20: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/20.jpg)
www.devoxx4kids.org
![Page 21: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/21.jpg)
www.devoxx4kids.org
1.Cablaggio elettronico (hardware)
2.Programmazione (software)
3.Trasferimento del software sull’Arduino e verifica del funzionamento
![Page 22: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/22.jpg)
www.devoxx4kids.org
void setup() { // Inizio della calibrazione, pinMode(PIN_LED_VERDE, OUTPUT); digitalWrite(PIN_LED_VERDE, LOW); pinMode(PIN_LED_GIALLO, OUTPUT); digitalWrite(PIN_LED_GIALLO, HIGH); // calibra per i primi 5 secondi.... while (millis() < 5000) { // registra valore massimo del sensore valoreSensore = analogRead(A0); if (valoreSensore > valoreAltoDelSensore) { valoreAltoDelSensore = valoreSensore; } // registra valore minimo del sensore if (valoreSensore < valoreBassoDelSensore) { valoreBassoDelSensore = valoreSensore; } } // calibrazione terminata... digitalWrite(PIN_LED_GIALLO, LOW); digitalWrite(PIN_LED_VERDE, HIGH);}
![Page 23: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/23.jpg)
www.devoxx4kids.org
void loop() { //Leggi il valore del sensore valoreSensore = analogRead(A0);
//spegni il suono se il valore letto e' //vicino al valore minimo o massimo if(siTrovaInUnIntervalloAccettabile(valoreSensore)) { // mappa il valore letto int x = map(valoreSensore, valoreBassoDelSensore, valoreAltoDelSensore, 50, 4000); // emetti un suono per 20 ms, PIN 8 tone(8, x, 20); }
// aspetta un momento delay(10);}
![Page 24: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/24.jpg)
www.devoxx4kids.org
1.Cablaggio elettronico (hardware)
2.Programmazione (software)
3.Trasferimento del software sull’Arduino e verifica del funzionamento
![Page 25: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/25.jpg)
www.devoxx4kids.org
Verifica e carica il software su Arduino tramite USB
![Page 26: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/26.jpg)
www.devoxx4kids.org
http://dexterindustries.com/blog/2012/03/02/quadrotor-lego-and-arduino/
![Page 27: Www.devoxx4kids.org Manno, 17 maggio 2014. 2 Celestino Andrea Gaspar Giorgio Serena](https://reader034.vdocuments.net/reader034/viewer/2022051314/551d9ddf497959293b8e9ccc/html5/thumbnails/27.jpg)
www.devoxx4kids.org
http://arduino.cc
http://fablab.supsi.ch/
http://fritzing.org
http://s4a.cat (Scratch per Arduino)