LED Control via Cloud Function | Blueprints gallery
Blueprints / LED Control via Cloud Function

LED Control via Cloud Function

Control the onboard LED with a cloud function and publish the new LED state.

Beginnerv1.0.0FunctionGPIOPublishConsole
Introduction
Supported devices
Hardware and devices
Project description

Introduction

This beginner blueprint demonstrates how to control an LED from the Particle Console using a cloud function (setLED). It's a simple pattern for remote control and state reporting.

Supported devices

Hardware and supplies

  • Supported Particle device
  • USB cable

Project description:

The firmware registers a cloud function setLED that accepts "ON", "OFF", or "TOGGLE". After updating the LED pin and internal state, it publishes a private led_state event with "ON" or "OFF". This approach provides both control and visibility for dashboards, webhooks, or other devices subscribing to the state.

Fork this project to your GitHub account Fork and edit