Particle IoT
JaxARCSIG April 2016
The three Truths
- Eventually anything that can be written in JavaScript will be written in JavaScript
- Everything that can be connected to the Internet will be connected to the Internet
- If it is on the internet, it must be true!
Internet of Things
-
IoT devices collect lots of data
-
AWS and Azure both have Big Data
and Machine learning solutions
Key features
- Internet connected
- Particle Cloud Service
- Host your own
- Arduino like code
- Pre-built libraries
- inexpensive, starting at $19
IoT History
- Arduino 2006
- Open source hardware
- Arduino sketches based on C++ w/ macros
- Possible to connect to internet thru tethering, external arduino shields
- TI CC3000 chip introduced 2013
- SparkCore Kickstarter 2013
Launched as Spark
- SparkCore introduced 2013
- SparkCore used CC3000 WiFi chip
- Changed name to Particle
- Particle Photon Fall 2015
- Photon uses Broadcom chip
- Particle Electron 2016 2G/3G
Photon Features
- Real-time OS (FreeRTOS)
- Broadcom BCM43362 Wi-Fi chip
- 120Mhz ARM Cortex M3 processor
- 1MB flash memory, 128K RAM
- 18 Mixed-signal GPIO ports
- Supports Digital/Analog
- I2C, UART, SPI and PWM
Development
- Arduino-like syntax
- Node.js based cli
- npm install -g particle-cli
- Web IDE @ build.particle.io
- Particle Dev ATOM based IDE
APIs
- Arduino like libraries for common addons like LCDs
- 4 Built-in cloud functions
- Particle.variable
- Particle.function
- Particle.publish
- Particle.subscribe
- JavaScript library
- iOS/Android libraries
- IFTTT
- Webhooks
- REST API
Basic Program
void setup() { }
void loop() { }
IoT HelloWorld!
// Define the pins we're going to call pinMode on
int greenLed = D7;
// This routine runs only once upon reset
void setup() {
// Initialize D7 pin as output
// It's important you do this here, inside the setup() function rather than outside it or in the loop function.
pinMode(greenLed, OUTPUT);
}
// This routine gets called repeatedly, like once every 5-15 milliseconds.
// Spark firmware interleaves background CPU activity associated with WiFi + Cloud activity with your code.
// Make sure none of your code delays or blocks for too long (like more than 5 seconds), or weird things can happen.
void loop() {
digitalWrite(greenLed, HIGH);
delay(500); // Wait for 500mS = 1 second
digitalWrite(greenLed, LOW);
delay(500); // Wait for 1 second in off mode
}
Particle Electron
- Cellular based board
- 2G and 3G options
- 2G to be EOL 2016
- No Wi-Fi, no problem
- $69 Dev kit
- First 3 months free
- $2.99 month for 1MB
- No contracts
- $0.99/each additional MB
Electron Kit
- Breadboard
- 3.7 V lipo battery
- Solar panel (optional)
- Waterproof case (optional)
- GPS (optional)
Particle limitations
- Doesn't have the power of Raspberry Pi
- Limited resources
- Limited to 1 request/event per second
- Bypass by hosting your own cloud
- 3V3 to 5.5V range
Particle advantages
- Designed for mass production
- Easy to use
- Easy to connect to Internet
- Dashboard management
- Great development experience
- Well documented
- Inexpensive
DEMO
https://particleled.herokuapp.com
tweet jaxarcsig (forward | back | right | left)
Questions?
Particle IoT
By David Fekke
Particle IoT
The slides for the April JaxARCSIG meeting on using Particle IoT prototyping boards for your IoT projects.
- 1,718