SlideShare une entreprise Scribd logo
1  sur  38
Télécharger pour lire hors ligne
1 
Getting to know Spark :) 
08 September 2014 
pre-#startathon workshop 
! 
@kennethlimcp
Who is Spark? 
• Started off as Spark Socket, an unsuccessful Kickstarter 
project 
• 2nd Kickstarter success last June 2013 
• Successful company incubated by HAXLR8R, Shenzhen, 
China 
• Currently a Series A company with US4.9 million funding 
2
Arduino Compatibility 
is compatible 
BUT 
!= !!! 
3
Product Comparison 
uC Cortex M3 ATMega32u4 
Clock Speed 72Mhz 16Mhz 
Flash Memory 128Kb 32Kb 
Digital I/O 8 20 
Analog I/0 8 12 
Ethernet Wireless Wireless + Wired 
Price US$39 US$67 
4
Spark Online Web IDE 
5
Create a new account 
• Go to: http://spark.io/BUILD 
6
Unboxing your Core for the 1st time 
7
Troubleshoot by colour 
Breathing Blue: Wifi On 
Blinking Green: Connecting to Wifi 
Breathing Cyan: Connected to Spark cloud 
Blinking Blue : Listening Mode 
Blinking Yellow: DFU Mode 
Blinking White: Factory reset 
Blinking Red: SOS panic code 
Blinking Yellow/Red: Bad keys
Factory Reset 
• Press BOTH the RST and 
MODE button 
• hold onto the MODE button for 
10 seconds 
! 
! 
** This always works…
Listening Mode 
• To configure Wifi Credentials 
• Either via Mobile App or USB 
! 
Solid blue: Credentials captured 
Flashing green: Connecting to Wi-Fi network 
Flashing cyan: Connecting to Spark Cloud 
Breathing cyan: Connected to Spark Cloud 
! 
! 
**Try to do one core at a time in a 
congested venue 
11
Flash your first app (wirelessly)
Spark IDE 
• Check for Core status 
• Use LED example to perform 
OTA flashing
Adding Spark.variable()
Spark.variable() 
• Allows you to read parameters from the core 
itself 
• eg. Temperature, battery voltage, motor 
status etc. 
• Add in the following: 
double temperature = 36.95; 
Spark.variable("temp", &temperature, 
DOUBLE); 
• Open Chrome and call the following URL: 
https://api.spark.io/v1/devices/core_id/ 
temp?access_token=your_token
Adding Spark.function()
Spark.function() 
• Calls a corresponding code function 
registered to the Spark.function name 
• Allows you to execute a command 
remotely via API call 
Add in the following: 
Spark.function("ledlight",ledlight); 
• Open Chrome and call the following 
URL: 
http://jflasher.github.io/spark-helper/
Spark.publish() demonstration
Using Spark-CLI 
A command-line interface for Spark
Why Spark-Cli? 
• Wraps all the long commands into simple syntax 
• Saves time and allows code development locally 
• Flashes code faster via USB 
• It’s fun to learn! :)
Spark-CLI 
• Let’s do the same activity using 
Spark-Cli! 
spark setup 
spark list 
spark get core_id temperature 
spark call core_id ledlight on/off
System Mode 
Controlling your own connection!
System Mode 
• This is important to know! Especially in a #startathon 
context 
• 3 Modes available: 
AUTOMATIC, SEMI_AUTOMATIC, MANUAL 
• Most user will require “SEMI_AUTOMATIC” for user code to run even 
without a Wifi connection 
Syntax: SYSTEM_MODE(MODE_SELECTION);
DFU Utility 
Upload/download to Spark core via USB
DFU Utility 
• Built into Spark-Cli tool as well 
• Allows us to download firmware binary file via USB 
• Access to the entire memory space in the internal and 
external flash
DFU Utility 
Hands-on Time!
DFU Mode 
• Press BOTH the RST and MODE 
button 
• Release the MODE button when 
the core starts flashing Yellow 
27
Cool Spark-powered Projects 
Look ma, no wires!
Open Energy Monitoring
Beehive Monitoring
Robotic Rover
Mr Wolowitz Lamp
Coffee Machine hack!
RFID Smart Locker
Just for fun!
Questions?
Additional Resources 
• API Helper GUI - http://jflasher.github.io/spark-helper 
• Spark-CLI (Mac): https://github.com/spark/spark-cli# 
installing 
• Spark-CLI (Win): https://community.spark.io/t/tutorial-spark- 
cli-on-windows-05-july-2014/3112 
• Documentation: http://docs.spark.io/
Thank you :) 
@kennethlimcp

Contenu connexe

En vedette

Taking control of your time
Taking control of your timeTaking control of your time
Taking control of your timeSuzy Dale
 
El chocolate
El chocolateEl chocolate
El chocolateelenarovi
 
Htc(宏達電)
Htc(宏達電)Htc(宏達電)
Htc(宏達電)Ting Ting
 
Syntax. reported speech andy y danny
Syntax. reported speech andy y dannySyntax. reported speech andy y danny
Syntax. reported speech andy y dannyAndrea Torres
 
7Jpros : Le CTLes au service des bibliothèques par M. Jean-Louis Baraggioli #...
7Jpros : Le CTLes au service des bibliothèques par M. Jean-Louis Baraggioli #...7Jpros : Le CTLes au service des bibliothèques par M. Jean-Louis Baraggioli #...
7Jpros : Le CTLes au service des bibliothèques par M. Jean-Louis Baraggioli #...CTLes
 
Kit digital Pepa Pig para imprimir gratis criatividade ativa
Kit digital Pepa Pig para imprimir gratis criatividade ativaKit digital Pepa Pig para imprimir gratis criatividade ativa
Kit digital Pepa Pig para imprimir gratis criatividade ativaCasal Criginski
 
Hosonhao
HosonhaoHosonhao
HosonhaoA3N8X
 

En vedette (9)

13 - Music
13 - Music13 - Music
13 - Music
 
Taking control of your time
Taking control of your timeTaking control of your time
Taking control of your time
 
El chocolate
El chocolateEl chocolate
El chocolate
 
Htc(宏達電)
Htc(宏達電)Htc(宏達電)
Htc(宏達電)
 
Syntax. reported speech andy y danny
Syntax. reported speech andy y dannySyntax. reported speech andy y danny
Syntax. reported speech andy y danny
 
7Jpros : Le CTLes au service des bibliothèques par M. Jean-Louis Baraggioli #...
7Jpros : Le CTLes au service des bibliothèques par M. Jean-Louis Baraggioli #...7Jpros : Le CTLes au service des bibliothèques par M. Jean-Louis Baraggioli #...
7Jpros : Le CTLes au service des bibliothèques par M. Jean-Louis Baraggioli #...
 
Kit digital Pepa Pig para imprimir gratis criatividade ativa
Kit digital Pepa Pig para imprimir gratis criatividade ativaKit digital Pepa Pig para imprimir gratis criatividade ativa
Kit digital Pepa Pig para imprimir gratis criatividade ativa
 
Focused on Your Success (with DB Plan)
Focused on Your Success (with DB Plan)Focused on Your Success (with DB Plan)
Focused on Your Success (with DB Plan)
 
Hosonhao
HosonhaoHosonhao
Hosonhao
 

Similaire à Spark - pre-#startathon Workshop 2014

#startathon2.0 - Spark Core
#startathon2.0 - Spark Core#startathon2.0 - Spark Core
#startathon2.0 - Spark Coresl2square
 
Talk at the Landelijk Architecure Congress (NL)
Talk at the Landelijk Architecure Congress (NL)Talk at the Landelijk Architecure Congress (NL)
Talk at the Landelijk Architecure Congress (NL)Jonathan Carter
 
BOX of Illusion MOSEC'17
BOX of Illusion MOSEC'17BOX of Illusion MOSEC'17
BOX of Illusion MOSEC'17Python0x0
 
[MakerHN] [IoT] [01] Intro 2
[MakerHN] [IoT] [01] Intro 2[MakerHN] [IoT] [01] Intro 2
[MakerHN] [IoT] [01] Intro 2Công Hoàng Văn
 
ch4-Software is Everywhere
ch4-Software is Everywherech4-Software is Everywhere
ch4-Software is Everywheressuser06ea42
 
Smart homes using android
Smart homes using androidSmart homes using android
Smart homes using androidDroidcon Berlin
 
[HES2013] Hacking apple accessories to pown iDevices – Wake up Neo! Your phon...
[HES2013] Hacking apple accessories to pown iDevices – Wake up Neo! Your phon...[HES2013] Hacking apple accessories to pown iDevices – Wake up Neo! Your phon...
[HES2013] Hacking apple accessories to pown iDevices – Wake up Neo! Your phon...Hackito Ergo Sum
 
Continuous integration by Rémy Virin
Continuous integration by Rémy VirinContinuous integration by Rémy Virin
Continuous integration by Rémy VirinCocoaHeads France
 
Practical IoT Exploitation (DEFCON23 IoTVillage) - Lyon Yang
Practical IoT Exploitation (DEFCON23 IoTVillage) - Lyon YangPractical IoT Exploitation (DEFCON23 IoTVillage) - Lyon Yang
Practical IoT Exploitation (DEFCON23 IoTVillage) - Lyon YangLyon Yang
 
Forensics WS Consolidated
Forensics WS ConsolidatedForensics WS Consolidated
Forensics WS ConsolidatedKarter Rohrer
 
Scalable Data Science with Spark and R
Scalable Data Science with Spark and RScalable Data Science with Spark and R
Scalable Data Science with Spark and RZeydy Ortiz, Ph. D.
 
Taller IoT en la Actualidad
Taller IoT en la ActualidadTaller IoT en la Actualidad
Taller IoT en la ActualidadLaurence HR
 
Advanced SOHO Router Exploitation XCON
Advanced SOHO Router Exploitation XCONAdvanced SOHO Router Exploitation XCON
Advanced SOHO Router Exploitation XCONLyon Yang
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Adam Dunkels
 
Building a Thought Controlled Drone
Building a Thought Controlled DroneBuilding a Thought Controlled Drone
Building a Thought Controlled DroneJim McKeeth
 
From printed circuit boards to exploits
From printed circuit boards to exploitsFrom printed circuit boards to exploits
From printed circuit boards to exploitsvirtualabs
 
Project Basecamp: News From Camp 4
Project Basecamp: News From Camp 4Project Basecamp: News From Camp 4
Project Basecamp: News From Camp 4Digital Bond
 

Similaire à Spark - pre-#startathon Workshop 2014 (20)

#startathon2.0 - Spark Core
#startathon2.0 - Spark Core#startathon2.0 - Spark Core
#startathon2.0 - Spark Core
 
Talk at the Landelijk Architecure Congress (NL)
Talk at the Landelijk Architecure Congress (NL)Talk at the Landelijk Architecure Congress (NL)
Talk at the Landelijk Architecure Congress (NL)
 
BOX of Illusion MOSEC'17
BOX of Illusion MOSEC'17BOX of Illusion MOSEC'17
BOX of Illusion MOSEC'17
 
[MakerHN] [IoT] [01] Intro 2
[MakerHN] [IoT] [01] Intro 2[MakerHN] [IoT] [01] Intro 2
[MakerHN] [IoT] [01] Intro 2
 
ch4-Software is Everywhere
ch4-Software is Everywherech4-Software is Everywhere
ch4-Software is Everywhere
 
Smart homes using android
Smart homes using androidSmart homes using android
Smart homes using android
 
Esp8266 Workshop
Esp8266 WorkshopEsp8266 Workshop
Esp8266 Workshop
 
[HES2013] Hacking apple accessories to pown iDevices – Wake up Neo! Your phon...
[HES2013] Hacking apple accessories to pown iDevices – Wake up Neo! Your phon...[HES2013] Hacking apple accessories to pown iDevices – Wake up Neo! Your phon...
[HES2013] Hacking apple accessories to pown iDevices – Wake up Neo! Your phon...
 
Ug soar 22sep21
Ug soar 22sep21Ug soar 22sep21
Ug soar 22sep21
 
Continuous integration by Rémy Virin
Continuous integration by Rémy VirinContinuous integration by Rémy Virin
Continuous integration by Rémy Virin
 
Practical IoT Exploitation (DEFCON23 IoTVillage) - Lyon Yang
Practical IoT Exploitation (DEFCON23 IoTVillage) - Lyon YangPractical IoT Exploitation (DEFCON23 IoTVillage) - Lyon Yang
Practical IoT Exploitation (DEFCON23 IoTVillage) - Lyon Yang
 
Forensics WS Consolidated
Forensics WS ConsolidatedForensics WS Consolidated
Forensics WS Consolidated
 
Scalable Data Science with Spark and R
Scalable Data Science with Spark and RScalable Data Science with Spark and R
Scalable Data Science with Spark and R
 
Taller IoT en la Actualidad
Taller IoT en la ActualidadTaller IoT en la Actualidad
Taller IoT en la Actualidad
 
Advanced SOHO Router Exploitation XCON
Advanced SOHO Router Exploitation XCONAdvanced SOHO Router Exploitation XCON
Advanced SOHO Router Exploitation XCON
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
 
Building a Thought Controlled Drone
Building a Thought Controlled DroneBuilding a Thought Controlled Drone
Building a Thought Controlled Drone
 
Road to RIoT 2017 Medan
Road to RIoT 2017 MedanRoad to RIoT 2017 Medan
Road to RIoT 2017 Medan
 
From printed circuit boards to exploits
From printed circuit boards to exploitsFrom printed circuit boards to exploits
From printed circuit boards to exploits
 
Project Basecamp: News From Camp 4
Project Basecamp: News From Camp 4Project Basecamp: News From Camp 4
Project Basecamp: News From Camp 4
 

Dernier

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterMateoGardella
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 

Dernier (20)

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 

Spark - pre-#startathon Workshop 2014

  • 1. 1 Getting to know Spark :) 08 September 2014 pre-#startathon workshop ! @kennethlimcp
  • 2. Who is Spark? • Started off as Spark Socket, an unsuccessful Kickstarter project • 2nd Kickstarter success last June 2013 • Successful company incubated by HAXLR8R, Shenzhen, China • Currently a Series A company with US4.9 million funding 2
  • 3. Arduino Compatibility is compatible BUT != !!! 3
  • 4. Product Comparison uC Cortex M3 ATMega32u4 Clock Speed 72Mhz 16Mhz Flash Memory 128Kb 32Kb Digital I/O 8 20 Analog I/0 8 12 Ethernet Wireless Wireless + Wired Price US$39 US$67 4
  • 6. Create a new account • Go to: http://spark.io/BUILD 6
  • 7. Unboxing your Core for the 1st time 7
  • 8.
  • 9. Troubleshoot by colour Breathing Blue: Wifi On Blinking Green: Connecting to Wifi Breathing Cyan: Connected to Spark cloud Blinking Blue : Listening Mode Blinking Yellow: DFU Mode Blinking White: Factory reset Blinking Red: SOS panic code Blinking Yellow/Red: Bad keys
  • 10. Factory Reset • Press BOTH the RST and MODE button • hold onto the MODE button for 10 seconds ! ! ** This always works…
  • 11. Listening Mode • To configure Wifi Credentials • Either via Mobile App or USB ! Solid blue: Credentials captured Flashing green: Connecting to Wi-Fi network Flashing cyan: Connecting to Spark Cloud Breathing cyan: Connected to Spark Cloud ! ! **Try to do one core at a time in a congested venue 11
  • 12. Flash your first app (wirelessly)
  • 13. Spark IDE • Check for Core status • Use LED example to perform OTA flashing
  • 15. Spark.variable() • Allows you to read parameters from the core itself • eg. Temperature, battery voltage, motor status etc. • Add in the following: double temperature = 36.95; Spark.variable("temp", &temperature, DOUBLE); • Open Chrome and call the following URL: https://api.spark.io/v1/devices/core_id/ temp?access_token=your_token
  • 17. Spark.function() • Calls a corresponding code function registered to the Spark.function name • Allows you to execute a command remotely via API call Add in the following: Spark.function("ledlight",ledlight); • Open Chrome and call the following URL: http://jflasher.github.io/spark-helper/
  • 19. Using Spark-CLI A command-line interface for Spark
  • 20. Why Spark-Cli? • Wraps all the long commands into simple syntax • Saves time and allows code development locally • Flashes code faster via USB • It’s fun to learn! :)
  • 21. Spark-CLI • Let’s do the same activity using Spark-Cli! spark setup spark list spark get core_id temperature spark call core_id ledlight on/off
  • 22. System Mode Controlling your own connection!
  • 23. System Mode • This is important to know! Especially in a #startathon context • 3 Modes available: AUTOMATIC, SEMI_AUTOMATIC, MANUAL • Most user will require “SEMI_AUTOMATIC” for user code to run even without a Wifi connection Syntax: SYSTEM_MODE(MODE_SELECTION);
  • 24. DFU Utility Upload/download to Spark core via USB
  • 25. DFU Utility • Built into Spark-Cli tool as well • Allows us to download firmware binary file via USB • Access to the entire memory space in the internal and external flash
  • 27. DFU Mode • Press BOTH the RST and MODE button • Release the MODE button when the core starts flashing Yellow 27
  • 28. Cool Spark-powered Projects Look ma, no wires!
  • 37. Additional Resources • API Helper GUI - http://jflasher.github.io/spark-helper • Spark-CLI (Mac): https://github.com/spark/spark-cli# installing • Spark-CLI (Win): https://community.spark.io/t/tutorial-spark- cli-on-windows-05-july-2014/3112 • Documentation: http://docs.spark.io/
  • 38. Thank you :) @kennethlimcp