Blynk.Cloud
blynk.io
Resources
GitHub
Search…
Introduction
Getting Started
Quickstart
Developer Mode
Device Activation Methods
Template Quick Setup
Control Devices (GPIOs and beyond)
Send Data From Hardware To Blynk
Events
Notifications (Alerts)
Manage Notifications
OTA: Firmware Over-The-Air updates
Metadata Tutorial
Sign Up / Sign In
Platform overview
Blynk Products and Services
Products
Services
General Concepts
Device
Device Template
Users
Organizations
Multi-tenancy
Automations
Downloads
Blynk Mobile Apps
Blynk.Edgent
Blynk.Console
Overview
Search Data
Devices
Locations
Organizations
Users
Device Templates
Widgets (Console)
Blynk.Air
Settings
User Profile
Limits
Blynk.Apps
Overview
Mobile Dashboard Editor
Pages
Widgets (app)
Main Menu
Devices
Groups
Automations
Notifications
Blynk.Edgent - firmware API
Supported Boards
Installation
Configuration
Connection Management
Device Online/Offline Status
Digital/Analog Pins
Virtual Pins
Widget Properties
State Syncing
Timer
Time (RTC clock)
Timezone / Location
Log Event
Over-The-Air Firmware Updates (OTA)
Metadata
Debug
Reboot
Other
Limitations and Recommendations
Blynk Protocol
BLYNK.CLOUD (HTTPS API)
HTTPs REST API
Get Datastream Value
Get Multiple Datastream Values
Update Datastream Value
Update Multiple Datastreams Simultaneously
Upload a Set of Timestamped Data
Update Widget/Datastream Property
Send/Log An Event
Get Device History Data
Get Device Metadata Value
Is Device Connected
HTTPS API Troubleshooting
Security
Troubleshooting
General Issues
Developer Mode
Changes from Blynk 0.1
Glossary
Links
Commercial Use
Deploying Products With Dynamic AuthTokens
Deploying Products With Static Tokens
Working With Clients (PRO plan)
Supported topologies
Business Plan (White Label Solution)
Legacy Platform Help Articles
Legacy articles
Powered By
GitBook
Log Event
How to log an event using firmware API
Get an Event code
1.
Go to Device Template -> Events
2.
Find Event Code. Edit it if needed
3.
Copy it to use in the firmware code below:
Log Events from device
Use
Blynk.logEvent
command to log events to the Blynk cloud.
1
Blynk
.
logEvent
(
"event_code"
);
2
​
3
// Also, you can add a custom description:
4
Blynk
.
logEvent
(
"event_code"
,
String
(
"Temperature above threshold: "
)
+
temp
);
Copied!
Blynk.Edgent - firmware API - Previous
Timezone / Location
Next - Blynk.Edgent - firmware API
Over-The-Air Firmware Updates (OTA)
Last modified
1yr ago
Copy link
Contents
Get an Event code
Log Events from device