Binary clock code for my 'Wooden Bits' project. The clock is designed for output to WS2812 LED matrices such as Adafruits NeoPixel or Pimoroni's Unicorn Hat. Code was developed for Arduino (bClock/) but I've ported to Raspberry Pi (raspberryPi/)
OTHER License
01000010 01101001 01101110 01100001 01110010 01111001 01000011 01101100 01101111 01100011 01101011
______ _ _____ _ _
| ___ (_) / __ \ | | |
| |_/ /_ _ __ __ _ _ __ _ _ | / \/ | ___ ___| | __
| ___ \ | '_ \ / _` | '__| | | | | | | |/ _ \ / __| |/ /
| |_/ / | | | | (_| | | | |_| | | \__/\ | (_) | (__| <
\____/|_|_| |_|\__,_|_| \__, | \____/_|\___/ \___|_|\_\
__/ |
|___/
Originally made for Arduino controller in my Wooden Bits project, this is a binary clock for WS2812 LEDS that scales to any size pixel matrix. It includes a function for generating the 'snakes and ladders' arrangment of pixels, which can be used as a map reference for other functions.
setMatrix
for sending any binary size to display; not just time.initMatrixMap
for creating lookup map of disaply.For more details, see my blog post: http://wp.me/p2C0Bi-7R
Compile using the Arduino IDE or using the Makefile. Using the makefile reqruies 'Arduino.mk': https://github.com/sudar/Arduino-Makefile
Set the number of pixels in each row and column in 'bClock.h'. The clock will automatically scale the binary bits to the pixel grid - thanks to the pixelMap generation.
You can defined a flash on seconds 'pulse_second', rotated display 'rotate' and brightness
Compile using make
then run sudo ./bClock [brightness] [pulse_second] [rotate]
. Designed for Raspberry Pi
and Pimoroni Unicorn Hat but code can scale to any size matrix. pixelMap
generator is useful for
other functions other than this code.
Compile within Open SCAD and export as .dxf. The comments explain how to export the various different layout options. The designs are supplied for personal use only under Creative Commons Attribution-NonCommercial 4.0 International License.
John Whittington @j_whittington http://www.jbrengineering.co.uk 2014
Software is
Hardware (KiCad, OpenSCAD, design exports etc.) is
I make many of my projects Open Source so others can learn as I have, but please remember to follow the license terms and attribute any derivations or code reuse. You can do this by linking back to the project or jbrengineering.co.uk. Feel free to click the donate button above if you do use the source :).