Skip to content
  • Live
  • Blog
  • Shop
  • Contact
  • About
  • Instagram
  • YouTube
  • Twitch
  • GitHub
CheerLights

CheerLights

We are all connected.

  • Learn
  • Build
  • Connect
  • Toggle search form

Arduino Library for CheerLights

Posted on November 3, 2024November 8, 2024 By Hans Scharler No Comments on Arduino Library for CheerLights

We have published an official library that supports Arduino-compatible Wi-Fi-enabled boards, along with several examples. The library supports the Arduino MKR1000, Arduino MKR WiFi 1010, Arduino Uno WiFi Rev2, Arduino Mega WiFi Rev2, Arduino Uno R4 WiFi, ESP8266, and ESP32. Include the library at the top of your Arduino sketch, use the method CheerLights.getCurrentColor(), and set the color of your RGB LEDs.

CheerLights Arduino Library

Arduino Library Installation

  1. Open the Arduino IDE.
  2. Select Tools > Manage Libraries.
  3. Search for “CheerLights” and click “install”.
How to install the CheerLights Arduino Library

CheerLights Arduino Methods

  • begin(const char* ssid, const char* password): Initialize the library with your WiFi credentials to let the library handle the WiFi connection.
  • begin(): Initialize the library without WiFi credentials (use this to manually connect to the WiFi network and manage the WiFi connection outside the library).
  • reconnect(): Reconnect to the WiFi network.
  • isConnected(): Returns a boolean indicating whether the library is connected to the WiFi network.
  • getCurrentColor(): Get the current CheerLights color from ThingSpeak channel 1417. Returns a pointer to a constant char array.
  • currentColorName(): The current CheerLights color name (e.g., “red”). Returns a pointer to a constant char array.
  • currentColorHex(): The current CheerLights color as a hex value (e.g., 0xFF0000). Returns a uint32_t.
  • currentRed(), currentGreen(), currentBlue(): The RGB values for the current CheerLights color (e.g., 255, 0, 0). Returns a uint8_t.
  • hasColorChanged(): Returns a boolean indicating whether the current CheerLights color has changed since the last call to this method.

CheerLights Arduino Library Reference: https://reference.arduino.cc/reference/en/libraries/cheerlights/

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Reddit (Opens in new window) Reddit
  • More
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to email a link to a friend (Opens in new window) Email
  • Click to print (Opens in new window) Print

Related

News

Post navigation

Previous Post: Offical Python Package for the CheerLights API

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Arduino Library for CheerLights
  • Offical Python Package for the CheerLights API
  • CheerLights JavaScript Widgets
  • Learn How to Make a CheerLights Tree Topper
  • Christmas in July with CheerLights

Copyright © 2025 CheerLights.

Powered by PressBook Grid Blogs theme

 

Loading Comments...