/LED-Strip-Controller

Firmware for an IR transceiver circuit to control a coloured LED strip

Primary LanguageC++

LED Strip Controller

Most coloured LED strips are controlled via a remote or bluetooth app. I created firmware to control the LEDs from my computer using an IR transceiver circuit powered by an Arudino microcontroller. The firmware was written in C++ with an optional PowerShell script to control the program from the terminal.

Table of Contents
  1. Demo
  2. Features
  3. Getting Started

Demo

The video shows the PowerShell script running in the terminal. Multiple commands are called quickly to show the colour changes of the LED strip as well as the LED indicator on the breadboard—green is for transmit, blue is for receive, and red is for invalid command.

LED.Controller.Demo.mp4

Features

  • Control IR based LED strips (NEC protocol) using the Arudino IDE serial console or terminal
  • Monitor data being sent over IR using the Arudino IDE serial console or terminal
  • Help menu listing available commands (terminal only)

Getting Started

The program can be run from the Arduino IDE. Once the firmware has been flashed to the microcontroller, the program can also be run from the terminal (with Windows PowerShell).

Prerequisites

Schematic

General Schematic

Dependencies

The IRremote.h library must be installed in your directory or through the Arudino IDE Library Manager.

How to run the program

Arduino IDE

  • Flash the code to the microcontroller
  • Open the serial monitor under Tools > Serial Monitor
  • Use valid commands found on line 37 of LED-Strip-Controller.ino

PowerShell Script

  • Flash the code to the microcontroller
  • Open Windows PowerShell and change into the project directory:
cd "C:\Users\name\repo"
  • Run the script:
.\script.ps1
  • Note, the script can be run from other CLIs such as command prompt:
powershell "& ""C:\my_path\script.ps1"""