SlideShare una empresa de Scribd logo
1 de 38
Descargar para leer sin conexión
Biicode:
1. Begin with Arduino.
2. Create your workspace.
3. Biicode & Eclipse.
4. How to reuse code.
5. Publish your code.
IoT examples:
1. temboo & twitter.
a. temboo.
b. adafruit cc3000.
c. adafruit 10dof.
d. LCD.
2. temboo & nexmo.
a. temboo.
b. adafruit cc3000.
c. adafruit 10dof.
d. Smartphone.
Index
How to begin: Arduino
1. Create a web account.
2. Download biicode client. https://www.biicode.
com/downloads
$ bii init
$ bii setup:arduino
$ bii new
Code as usual
$ bii arduino:upload
Register
https://www.biicode.com/downloads
Download biicode
$ mkdir biicode_workspace
$ cd biicode_workspace
~/biicode_workspace$ bii init
Username: your_user_name
Password for your_user_name: your_password
Initialization correct, now you can create your first hive
$ bii setup:arduino
Create your Workspace
The workspace is folder where all project
are placed.
In biicode, we call hives to the projects.
Workspace
All tools with one command
$ bii setup:arduino
$ bii new fab10
Select language: (java/node/fortran/python/cpp/arduino/None)
Introduce lang: arduino
How would you like to name your first block?
Introduce block name: my_blink
INFO: Selected block name: my_blink
Generate default firmware? (YES/no): [ENTER]
Introduce board: uno
Arduino detected on port COM17
Select IDE: (eclipse/none)
Introduce ide (default:None) (/o list options): [ENTER]
Create your Hive
Hive
there are the biicode
projects.
You can have all the hive
you like.
Blink & biicode
#include "Arduino.h"
int led = 13;
void setup(){
pinMode(led, OUTPUT);
}
void loop(){
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}
All you need
to change
$ cd fab10
~/fab10$ bii arduino:build
...
~/fab10$ bii arduino:upload
your settings
$ cd fab10
~/fab10$ bii arduino:settings
Introduce board: uno
Arduino detected on port COM17
Select IDE: (eclipse/none)
Introduce ide (default:None) (/o list options): eclipse
~/iot_day$ bii arduino:configure
https://www.eclipse.org/downloads
Eclipse
Import your hive into Eclipse
Build your hive in Eclipse
Lets code
#include "Arduino.h"
int led = 13;
void setup(){
Serial.begin(9600);
pinMode(led, OUTPUT);
}
void loop(){
Serial.println(F("Led ON"));
digitalWrite(led, HIGH);
delay(1000);
Serial.println(F("Led OFF"));
digitalWrite(led, LOW);
delay(1000);
}
$ cd fab10
~/fab10$ bii arduino:monitor
~/fab10$ bii arduino:upload
Serial monitor
Reuse code
hive_name$ bii find
hive_name$ bii arduino:update
www.biicode.com/fenix
main.cpp
Reuse code
#include "fenix/blink/blink.h"
Blink my_blink;
void setup(){
my_blink.setup (13, 1000);
}
void loop(){
my_blink.loop();
}
blink.cpp
hive_name$ bii find
hive_name$ bii arduino:update
~/fab10$ bii publish
block: my_blink
Introduce tag: STABLE
Introduce msg: My first block
INFO: Successfully published user_name/hello(user_name/master): 0
Publish your code
bii deps --graph
IoT Examples
IoT: how to use twitter with your Arduino, Temboo and Adafruit HW
diego/ardunet adafruit/ada_10dof
LiquidCrystal.h
Hardware & biicode blocks
Create an account in Temboo https://www.temboo.com/
See your Temboo settings.
TEMBOO_ACCOUNT
TEMBOO_APP_KEY_NAME
TEMBOO_APP_KEY
Create a new Temboo credential to send an email to a Gmail
account.
See that all are correctly saved.
TEMBOO_MYMAIL_CREDENTIAL
Define the necessary variables to WiFi and to Temboo.
main.cpp
//This file, located in your hive root folder define your wifi settings. Do not publish it!
//mywifidetails.h
//#define WLAN_SSID "YOUR_SSID" // cannot be longer than 32 characters!
//#define WLAN_PASS "your_password"
//#define WLAN_SECURITY YOUR_WIFI_SECURITY //WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or
WLAN_SEC_WPA2
//This file will contain your TEMBOO_MYMAIL_CREDENTIAL, TEMBOO_ACCOUNT, TEMBOO_APP_KEY_NAME,
TEMBOO_APP_KEY, do not publish it with your block
//tembooaccount.h
//#define TEMBOO_ACCOUNT "name_account"
//#define TEMBOO_APP_KEY_NAME "application_account_name"
//#define TEMBOO_APP_KEY "application_account_name_key"
//#define TEMBOO_MYMAIL_CREDENTIAL "credential_name"
Use the serial monitor to upload your code.
IoT: Control your Arduino by phone with Nexmo and Temboo (and Adafruit HW)
Hardware & biicode blocks
diego/ardunet adafruit/ada_10dof
Create an account in Nexmo: https://www.nexmo.com/
Enter your mobile number to receive a SMS to activate your
account
See your Nexmo API settings.
NEXMO_API_KEY
NEXMO_API_SECRET
Define the necessary variables to WiFi and to Temboo.
main.cpp
//This file, located in your hive root folder define your wifi settings. Do not publish it!
//mywifidetails.h
//#define WLAN_SSID "YOUR_SSID" // cannot be longer than 32 characters!
//#define WLAN_PASS "your_password"
//#define WLAN_SECURITY YOUR_WIFI_SECURITY //WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or
WLAN_SEC_WPA2
//This file will contain your TEMBOO_MYMAIL_CREDENTIAL, TEMBOO_ACCOUNT, TEMBOO_APP_KEY_NAME,
TEMBOO_APP_KEY, do not publish it with your block
//tembooaccount.h
//#define TEMBOO_ACCOUNT "name_account"
//#define TEMBOO_APP_KEY_NAME "application_account_name"
//#define TEMBOO_APP_KEY "application_account_name_key"
//#define NEXMO_API_KEY "api_key"
//#define NEXMO_API_SECRET “api_secret”
//#define NUMBER_TO “number”
Use the serial monitor to upload your code.

Más contenido relacionado

Último

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Último (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Fab10: arduino & biicode

  • 1.
  • 2. Biicode: 1. Begin with Arduino. 2. Create your workspace. 3. Biicode & Eclipse. 4. How to reuse code. 5. Publish your code. IoT examples: 1. temboo & twitter. a. temboo. b. adafruit cc3000. c. adafruit 10dof. d. LCD. 2. temboo & nexmo. a. temboo. b. adafruit cc3000. c. adafruit 10dof. d. Smartphone. Index
  • 3.
  • 4. How to begin: Arduino 1. Create a web account. 2. Download biicode client. https://www.biicode. com/downloads $ bii init $ bii setup:arduino $ bii new Code as usual $ bii arduino:upload
  • 7. $ mkdir biicode_workspace $ cd biicode_workspace ~/biicode_workspace$ bii init Username: your_user_name Password for your_user_name: your_password Initialization correct, now you can create your first hive $ bii setup:arduino Create your Workspace
  • 8. The workspace is folder where all project are placed. In biicode, we call hives to the projects. Workspace
  • 9. All tools with one command $ bii setup:arduino
  • 10. $ bii new fab10 Select language: (java/node/fortran/python/cpp/arduino/None) Introduce lang: arduino How would you like to name your first block? Introduce block name: my_blink INFO: Selected block name: my_blink Generate default firmware? (YES/no): [ENTER] Introduce board: uno Arduino detected on port COM17 Select IDE: (eclipse/none) Introduce ide (default:None) (/o list options): [ENTER] Create your Hive
  • 11. Hive there are the biicode projects. You can have all the hive you like.
  • 12. Blink & biicode #include "Arduino.h" int led = 13; void setup(){ pinMode(led, OUTPUT); } void loop(){ digitalWrite(led, HIGH); delay(1000); digitalWrite(led, LOW); delay(1000); } All you need to change $ cd fab10 ~/fab10$ bii arduino:build ... ~/fab10$ bii arduino:upload
  • 13. your settings $ cd fab10 ~/fab10$ bii arduino:settings Introduce board: uno Arduino detected on port COM17 Select IDE: (eclipse/none) Introduce ide (default:None) (/o list options): eclipse ~/iot_day$ bii arduino:configure
  • 15. Import your hive into Eclipse
  • 16. Build your hive in Eclipse
  • 17. Lets code #include "Arduino.h" int led = 13; void setup(){ Serial.begin(9600); pinMode(led, OUTPUT); } void loop(){ Serial.println(F("Led ON")); digitalWrite(led, HIGH); delay(1000); Serial.println(F("Led OFF")); digitalWrite(led, LOW); delay(1000); }
  • 18. $ cd fab10 ~/fab10$ bii arduino:monitor ~/fab10$ bii arduino:upload Serial monitor
  • 19. Reuse code hive_name$ bii find hive_name$ bii arduino:update www.biicode.com/fenix main.cpp
  • 20. Reuse code #include "fenix/blink/blink.h" Blink my_blink; void setup(){ my_blink.setup (13, 1000); } void loop(){ my_blink.loop(); } blink.cpp hive_name$ bii find hive_name$ bii arduino:update
  • 21. ~/fab10$ bii publish block: my_blink Introduce tag: STABLE Introduce msg: My first block INFO: Successfully published user_name/hello(user_name/master): 0 Publish your code
  • 24. IoT: how to use twitter with your Arduino, Temboo and Adafruit HW
  • 26. Create an account in Temboo https://www.temboo.com/
  • 27. See your Temboo settings. TEMBOO_ACCOUNT TEMBOO_APP_KEY_NAME TEMBOO_APP_KEY
  • 28. Create a new Temboo credential to send an email to a Gmail account.
  • 29. See that all are correctly saved. TEMBOO_MYMAIL_CREDENTIAL
  • 30. Define the necessary variables to WiFi and to Temboo. main.cpp //This file, located in your hive root folder define your wifi settings. Do not publish it! //mywifidetails.h //#define WLAN_SSID "YOUR_SSID" // cannot be longer than 32 characters! //#define WLAN_PASS "your_password" //#define WLAN_SECURITY YOUR_WIFI_SECURITY //WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2 //This file will contain your TEMBOO_MYMAIL_CREDENTIAL, TEMBOO_ACCOUNT, TEMBOO_APP_KEY_NAME, TEMBOO_APP_KEY, do not publish it with your block //tembooaccount.h //#define TEMBOO_ACCOUNT "name_account" //#define TEMBOO_APP_KEY_NAME "application_account_name" //#define TEMBOO_APP_KEY "application_account_name_key" //#define TEMBOO_MYMAIL_CREDENTIAL "credential_name"
  • 31. Use the serial monitor to upload your code.
  • 32. IoT: Control your Arduino by phone with Nexmo and Temboo (and Adafruit HW)
  • 33. Hardware & biicode blocks diego/ardunet adafruit/ada_10dof
  • 34. Create an account in Nexmo: https://www.nexmo.com/
  • 35. Enter your mobile number to receive a SMS to activate your account
  • 36. See your Nexmo API settings. NEXMO_API_KEY NEXMO_API_SECRET
  • 37. Define the necessary variables to WiFi and to Temboo. main.cpp //This file, located in your hive root folder define your wifi settings. Do not publish it! //mywifidetails.h //#define WLAN_SSID "YOUR_SSID" // cannot be longer than 32 characters! //#define WLAN_PASS "your_password" //#define WLAN_SECURITY YOUR_WIFI_SECURITY //WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2 //This file will contain your TEMBOO_MYMAIL_CREDENTIAL, TEMBOO_ACCOUNT, TEMBOO_APP_KEY_NAME, TEMBOO_APP_KEY, do not publish it with your block //tembooaccount.h //#define TEMBOO_ACCOUNT "name_account" //#define TEMBOO_APP_KEY_NAME "application_account_name" //#define TEMBOO_APP_KEY "application_account_name_key" //#define NEXMO_API_KEY "api_key" //#define NEXMO_API_SECRET “api_secret” //#define NUMBER_TO “number”
  • 38. Use the serial monitor to upload your code.