Particle Photon: A small Wi-Fi enabled development kit for creating connected projects.
Key Features:
- Broadcom Wi-Fi chip
- STM32 ARM Cortex M3 microcontroller
- Built-in RGB LED (D7)
- Headers for easy prototyping
A comprehensive cheat sheet for the Particle Photon, covering its key features, setup, coding, and cloud integration. This guide provides a quick reference for developers working with the Photon for IoT projects.
Particle Photon: A small Wi-Fi enabled development kit for creating connected projects. Key Features:
|
npm install -g particle-cli |
D0-D7: |
Digital I/O pins |
A0-A7: |
Analog input pins |
TX/RX: |
Serial communication pins |
VIN: |
Voltage Input (3.6V - 12V) |
3V3: |
3.3V output |
GND: |
Ground |
|
|
Sets the mode of a digital pin (INPUT, OUTPUT, INPUT_PULLUP) |
|
Writes HIGH or LOW to a digital pin |
|
Reads the value (HIGH or LOW) from a digital pin |
Example: |
|
|
Reads the analog value (0-4095) from an analog pin |
|
Writes an analog value (PWM) to a digital pin (0-255) |
Example: |
|
|
Pauses the program for a specified number of milliseconds |
|
Returns the number of milliseconds since the program started running |
|
Returns the number of microseconds since the program started running |
Cloud functions allow you to call functions on your Photon from the Particle Cloud API.
Accessing the Function via the API: |
Cloud variables allow you to read variables from your Photon via the Particle Cloud API.
Accessing the Variable via the API: |
Publishing events allows you to send data from your Photon to the Particle Cloud.
|
You can also specify the event’s privacy:
Options are |
|
Returns |
|
Returns |
|
Resets the Photon. |
|
Puts the Photon in DFU (Device Firmware Upgrade) mode for flashing firmware via USB. |
|
Puts the Photon in a low-power sleep mode. |
Use |