Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

#SparkNightLab 1st edition - #Iot #Spark

528 visualizaciones

Publicado el

Slide presented during the 1st edition of the SparkNightLab in Turin 06 Mar 2015. Sponsored by spark.io

Publicado en: Dispositivos y hardware
  • -- DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT -- ......................................................................................................................... ......................................................................................................................... Download FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... (Unlimited)
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • ACCESS that WEBSITE Over for All Ebooks (Unlimited) ......................................................................................................................... DOWNLOAD FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... DOWNLOAD FULL EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M }
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • -- DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT -- ......................................................................................................................... ......................................................................................................................... Download FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... (Unlimited)
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • If you want to download or read this book, Copy link or url below in the New tab ......................................................................................................................... DOWNLOAD FULL PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... .........................................................................................................................
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • ..............ACCESS that WEBSITE Over for All Ebooks ................ ......................................................................................................................... DOWNLOAD FULL PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } .........................................................................................................................
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí

#SparkNightLab 1st edition - #Iot #Spark

  1. 1. 6 Marzo 2015 SPARK NIGHT LAB @Fablab Torino #SPARKNIGHTLAB
  2. 2. Info e link condivisi durante l’evento Repository del codice dei lab https://github.com/noce2k/SparkNightLab Helper richieste HTTP POST http://jflasher.github.io/spark-helper/ Documentazione ufficiale Spark http://docs.spark.io/ Alcuni progetti Spark http://spark.hackster.io/
  3. 3. #SPARKNIGHTLAB Sponsored by Spark.io Sponsored by Spark.io #SPARKNIGHTLAB Chi Siamo Marco Bodoira MVP Microsoft Windows Embedded Solution Architect @ Avanade @marcobodoira Roberto Nocera MVP Microsoft Dynamics CRM Digital Solution Architect @ Avanade @noce2k
  4. 4. #SPARKNIGHTLAB Sponsored by Spark.io Sponsored by Spark.io #SPARKNIGHTLAB Ringraziamenti FABLAB TORINOSPARK.IO
  5. 5. #SPARKNIGHTLAB Sponsored by Spark.io Sponsored by Spark.io #SPARKNIGHTLAB Questo non è un workshop
  6. 6. #SPARKNIGHTLAB Sponsored by Spark.io Sponsored by Spark.io #SPARKNIGHTLAB Il KIT #sparknightlab LM35
  7. 7. #SPARKNIGHTLAB Sponsored by Spark.io Presentazione soluzioni Spark Laboratori Collegamento con team Spark.io Chiusura
  8. 8. #SPARKNIGHTLAB Sponsored by Spark.io Spark.io
  9. 9. #SPARKNIGHTLAB Sponsored by Spark.io
  10. 10. #SPARKNIGHTLAB Sponsored by Spark.io CORE $39 PHOTON $19 ELECTRON $39 it's faster, better, and cheaper Arduino + Wi-Fi + ARM Cortex M3 + wireless programming + REST API = awesome. M2MTO YOU
  11. 11. #SPARKNIGHTLAB Sponsored by Spark.io
  12. 12. #SPARKNIGHTLAB Sponsored by Spark.io REST-API Web IDE Spark IDE Wireless programming TINKER Hardware Firmware Cloud Interface
  13. 13. #SPARKNIGHTLAB Sponsored by Spark.io I laboratori di questa sera Hand-on lab #1 : Connetti il tuo Spark Core Hand-on lab #2 : Accendere un led Hand-on lab #3 : Controllare un led da remoto Hand-on lab #4 : Controlla la temperatura Hand-on lab #5 : Invia un SMS o un tweet
  14. 14. #SPARKNIGHTLAB Sponsored by Spark.io Connetti il tuo Spark Core Hands-on Lab #1
  15. 15. #SPARKNIGHTLAB Sponsored by Spark.io Accendere il Core Connettere il cavo USB al Core e il PC. Il Core dovrebbe iniziare a lampeggiare blu. Non sta lampeggiando blu? Potrebbe essere già stato configurato. Mantenere premuto il tasto MODE fino a quando non inizia a lampeggiare blu. http://docs.spark.io/start/
  16. 16. #SPARKNIGHTLAB Sponsored by Spark.io Connettere il core al Cloud Connessione Impostazione WI-FI Registrazione Core Via Mobile app Via USB
  17. 17. #SPARKNIGHTLAB Sponsored by Spark.io Connessione via USB Connessione Impostazione WI-FI Registrazione Core 1. Scaricare PuTTY http://www.chiark.greenend.org.uk/~sgtatham/putty/ 2. Scaricare i driver Windows per lo Spark Core https://s3.amazonaws.com/spark-website/Spark.zip 3. Aprire una porta seriale via USB con I seguenti parametri: • Baudrate: 9600 • Data Bits: 8 • Parity: none • Stop Bits: 1
  18. 18. #SPARKNIGHTLAB Sponsored by Spark.io Impostare Wi-Fi SSID & password Connessione Impostazione WI-FI Registrazione Core w SSID: yourWifiName Password: ***** Thanks! Wait about 7 seconds while I save those credentials Awesome. Now we’ll connect! If you see a pulsing cyan light, your spark core has connected to the cloud and is ready to go!
  19. 19. #SPARKNIGHTLAB Sponsored by Spark.io Registrare il Core Connessione Impostazione WI-FI Registrazione Core Necessario per essere associato al proprio account. Aprire la pagina Spark Build https://www.spark.io/build Cliccare sull’icona 'Cores'. Cliccare sul pulsante 'Add a Core', e inserire l’ID. i 55ff68064989495329092587
  20. 20. #SPARKNIGHTLAB Sponsored by Spark.io Registrare il Core Connessione Impostazione WI-FI Registrazione Core
  21. 21. #SPARKNIGHTLAB Sponsored by Spark.io Accendere un led Hands-on Lab #2.1
  22. 22. #SPARKNIGHTLAB Sponsored by Spark.io Realizzare il circuito Elementi necessari: • 1 Spark Core • 1 resistenza • 1 LED • 2 cavetti Hardware Software Test
  23. 23. #SPARKNIGHTLAB Sponsored by Spark.io Scrivere il codice // Program to blink an LED connected to pin D0 // of the Spark Core. // We name pin D0 as led int led = D0; // This routine runs only once upon reset void setup() { // Initialize D0 pin as output pinMode(led, OUTPUT); } // This routine loops forever void loop() { digitalWrite(led, HIGH); // Turn ON the LED delay(1000); // Wait for 1000mS = 1 second digitalWrite(led, LOW); // Turn OFF the LED delay(1000); // Wait for 1 second } Hardware Software Test 1. Creare un account per sviluppatori alla pagina www.spark.io/build Aprire l’app di esempio BLINK AN LED 2. Premere Verify per compilare 3. Premere il pulsante Flash per aggiornare via OTA il firmware
  24. 24. #SPARKNIGHTLAB Sponsored by Spark.io Test Hardware Software Test Dopo il riavvio il led inizierà a lampeggiare
  25. 25. #SPARKNIGHTLAB Sponsored by Spark.io Controllare un led da remoto Hands-on Lab #2.2
  26. 26. #SPARKNIGHTLAB Sponsored by Spark.io Realizzare il circuito Lo stesso circuito del laboratorio precedenteHardware Software Test
  27. 27. #SPARKNIGHTLAB Sponsored by Spark.io Scrivere il codice int led1 = D0; // We name pin D0 as led void setup() { Spark.function("led", ledControl); pinMode(led1, OUTPUT); digitalWrite(led1, LOW); } void loop() { } int ledControl(String command){ int state = 0; int pinNumber = (command.charAt(1) - '0') - 1; if(pinNumber < 0 || pinNumber > 1) return pinNumber; if (command.substring(3,7) == "HIGH") state = 1; else if(command.substring(3,6) == "LOW") state = 0; else return -1; digitalWrite(pinNumber, state); return 1; } Hardware Software Test 1. Modificare l’esempio precedente aggiungendo i metodi esposti dal servizio cloud di Spark Spark.function 2. Compilare il codice sorgente premendo Verify 3. Aggiornare lo Spark Core premendo il pulsante Flash
  28. 28. #SPARKNIGHTLAB Sponsored by Spark.io Test Hardware Software Test 1. Attendere che il led dello Spark Core lampeggi Ciano. 2. Aprire il browser alla pagina http://jflasher.github.io/spark-helper/ 3. Compilare i campi:
  29. 29. #SPARKNIGHTLAB Sponsored by Spark.io Controlla la temperature della tua casa Hands-on Lab #3
  30. 30. #SPARKNIGHTLAB Sponsored by Spark.io Realizzare il circuito Elementi necessari: • 1 Spark Core • 1 Sensore di temperatura • 1 capacitore ceramico • 3 cavi Hardware Software Test
  31. 31. #SPARKNIGHTLAB Sponsored by Spark.io Scrivere il codice //Create a variable that will store the temperature value double temperature = 0.0; void setup(){ // Register a Spark variable here Spark.variable("temperature", &temperature, DOUBLE); // Connect the temperature sensor to A7 and configure it // to be an input pinMode(A7, INPUT); } void loop(){ int reading = 0; double voltage = 0.0; // Keep reading the sensor value so when we make an API // call to read its value, we have the latest one reading = analogRead(A7); // The returned value from the Core is in the range 0 - 4095 // Calculate the voltage from the sensor reading voltage = (reading * 3.3) / 4095; // Calculate the temperature and update our static variable temperature = (voltage - 0.5) * 100; } Hardware Software Test 1. Creare una nuova app 2. Copiare il codice 3. Compilare il codice sorgente premendo Verify 4. Aggiornare lo Spark Core premendo il pulsante Flash
  32. 32. #SPARKNIGHTLAB Sponsored by Spark.io Test Hardware Software Test 1. Attendere che il led dello Spark Core lampeggi Ciano. 2. Aprire il browser alla pagina http://jflasher.github.io/spark-helper/ 3. Compilare i campi:
  33. 33. #SPARKNIGHTLAB Sponsored by Spark.io Invia SMS Hands-on Lab #4
  34. 34. #SPARKNIGHTLAB Sponsored by Spark.io Invia un SMS da Spark Core 1. Registrazione a twilio.com 2. Recupero configurazione accesso per un app 3. Registrazione a Temboo.com 4. Configurazione dei parametri per il test 5. Esecuzione test da DHC via browser • Utilizzo del codice per effettuare manualmente delle chiamate a twilio.com attraverso temboo.com
  35. 35. #SPARKNIGHTLAB Sponsored by Spark.io Invia Tweet Hands-on Lab #5
  36. 36. #SPARKNIGHTLAB Sponsored by Spark.io Invia un Tweet da Spark Core 1. Registrazione a twitter.com 2. Creazione configurazione accesso per un app 3. Registrazione a Temboo.com 4. Configurazione dei parametri per il test 5. Esecuzione test da console temboo.com • Utilizzo del codice di invio manuale tweet con Temboo.com
  37. 37. #SPARKNIGHTLAB Sponsored by Spark.io Spark core + Microsoft Azure Spark Core Mobile Services Data Storage iOS Post http Notification Hub Server Scripts - Insert - Update - Delete - Read Android Windows Phone Dashboard Microsoft Azure Esempio di soluzione
  38. 38. #SPARKNIGHTLAB Sponsored by Spark.io Perché usare Microsoft Azure Esistono molti servizi per memorizzare i dati in cloud. • Azure in più offre: • Svariate possibilità di gestione del dato (Mobile Services, Event Hubs, …) • Servizi accessori come Machine Learning
  39. 39. #SPARKNIGHTLAB Sponsored by Spark.io BREAK Photo by https://www.flickr.com/groups/1847246@N22/
  40. 40. #SPARKNIGHTLAB Sponsored by Spark.io Collegamento con il team di Spark.io
  41. 41. #SPARKNIGHTLAB Sponsored by Spark.io
  42. 42. #SPARKNIGHTLAB Sponsored by Spark.io Cosa abbiamo visto stasera Come si collega lo Spark Core e si configura per il primo utilizzo Sviluppo di progetti elementari con alcuni sensori Sviluppo di progetti più complessi sfruttando le peculiarità di Spark Core
  43. 43. #SPARKNIGHTLAB Sponsored by Spark.io • @sparknightlab http://community.spark.io/ @marcobodoira @noce2k
  44. 44. #SPARKNIGHTLAB Sponsored by Spark.io Allegati
  45. 45. #SPARKNIGHTLAB Sponsored by Spark.io Risorse Utili Form per testare le chiamate http://jflasher.github.io/spark-helper/ Spark IDE https://www.spark.io/dev Sorgente dei labs http://github.com/noce2k Led di stato http://docs.spark.io/#leds
  46. 46. #SPARKNIGHTLAB Sponsored by Spark.io Led di Stato http://docs.spark.io/#leds
  47. 47. #SPARKNIGHTLAB Sponsored by Spark.io Known network issues
  48. 48. #SPARKNIGHTLAB Sponsored by Spark.io https://community.spark.io/t/howto-update-cc3000-via-dfu-util-windows/5665 HOW TO RE-INSTALL FACTORY FIRMWARE
  49. 49. #SPARKNIGHTLAB Sponsored by Spark.io Icon Credits

×