Skip to content

mitchellvitez/arduino-lights

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Arduino Lights

Haskell-to-C compiler for Arduino, and software simulator in Haskell. Lets you write your own light displays as relatively simple Haskell data structures, without having to e.g. know anything about monads.

Usage

You'll want to add your own patterns in src/Patterns.hs. Reading the types in src/Types.hs is a good start, or you can just copy from the example patterns in Patterns.hs.

By default, make run will run the software simulator. If your terminal supports color output via escape sequences, you should be able to see the lights in approximately the same color as they'd appear on actual hardware.

To switch from simulation to running on actual hardware, you'll need an Arduino device. make setup on a mac installs the Arduino CLI, finds the connected board, and connects. Swap which line is commented out in main, and then make run to run the compiler.

To see the actual C code which was generated by the compiler, look at ArduinoLights.ino

About

Run RGB LED light shows on Arduino using Haskell data structures

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published