Updating the ClockTHREE Jr. Software

One of my first tasks here at Wyolum was updating the old ClockTHREE Jr. software for Arduino 1.6.9, the newest version. I focused specifically on updating the file specified in the original tutorial for reprogramming the ClockTHREE Jr., ClockTHREE_04.ino. At first, when I tried compiling the sketch, the number of error messages that popped up frightened me. It was just a sea of blaring orange text, informing me on the multitude of errors spanning a variety of different documents. The task seemed to be very daunting, and I did not know if I would be able to complete this task. However, after I had gotten over my initial shock, i decided to be brave and actually read the error messages, rather than judge the difficulty of the task by their quantity. This act turned out to be immensely helpful, as after my analysis, I discovered that there were only 6 documents that needed to be changed, as opposed to my crazy original assumption of 20 or 25. Furthermore, there seemed to be one term that resonated throughout the error messages: “const.” With these 2 helpful facts in mind, I got to work. Below is a detailed analysis of what I did to the 6 documents:

  1. In the original file itself, ClockTHREE_04.ino, I included the english_v3.h file, uncommented the line that let the ClockTHREE Jr. account for Daylights Savings Time, and most importantly, changed “prog” in the line “PROGREM prog_uint32_t DST[] = {“ to a “const.”
  2. In the next document I changed, english_v3.h, I simply added a const after the “uint8/32_t” in the lines with WORDS[] PROGMEM, DISPLAYS[] PROGMEM, MINUTE_LEDS[] PROGMEM, and MINUTES_HACKS[] PROGMEM.
  3. The next file I had to change took me away from the ClockTHREE Jr. file and into the CHRONOGRAM2 file, where I had to update the english2_v1.h file. In this file, I changed “prog_char” to “const_char” in the lines with HOUR_WORDS[], HOUR_SEQ[], MINUTE_WORDS[], and MINUTE_SEQ[].
  4. In the files font.cpp and mem_font.cpp, I respectively changed “PROGMEM static char prog_char font8x8[] = {” to “PROGREM static const char font8x8[] = {“ and “static prog_char font8x7[] PROGMEM = {“ to “static const char font8x7[] PROGMEM = {.“
  5. In the final document I changed, DateStrings.cpp, I added a “const” to:
      1. char monthShortNames_P[] PROGMEM = “ErrJanFebMarAprMayJunJulAugSepOctNovDec”;
      2. char dayStr0[] PROGMEM = “Err”;
      3. char dayStr1[] PROGMEM = “Sunday”;
      4. char dayStr2[] PROGMEM = “Monday”;
      5. char dayStr3[] PROGMEM = “Tuesday”;
      6. char dayStr4[] PROGMEM = “Wednesday”;
      7. char dayStr5[] PROGMEM = “Thursday”;
      8. char dayStr6[] PROGMEM = “Friday”;
      9. char dayStr7[] PROGMEM = “Saturday”;
      10. PGM_P dayNames_P[] PROGMEM = { dayStr0,dayStr1,dayStr2,dayStr3,dayStr4,dayStr5,dayStr6,dayStr7};
      11. char dayShortNames_P[] PROGMEM = “ErrSunMonTueWedThrFriSat”;
      12. char monthStr1[] PROGMEM = “January”;
      13. char monthStr2[] PROGMEM = “February”;
      14. char monthStr3[] PROGMEM = “March”;
      15. char monthStr4[] PROGMEM = “April”;
      16. char monthStr5[] PROGMEM = “May”;
      17. char monthStr6[] PROGMEM = “June”;
      18. char monthStr7[] PROGMEM = “July”;
      19. char monthStr8[] PROGMEM = “August”;
      20. char monthStr9[] PROGMEM = “September”;
      21. char monthStr10[] PROGMEM = “October”;
      22. char monthStr11[] PROGMEM = “November”;
      23. char monthStr12[] PROGMEM = “December”;
      24. PGM_P monthNames_P[] PROGMEM =

After saving all of my changes, I compiled the code in Arduino 1.6.9, and to my utter delight, it worked!

a TiM Moodlight

dscn1798_26318788455_oA couple of weeks ago, I noticed a pair of old, first version TiM boards lying around at my local maker space, Maker’s Asylum and decided to put them to use by building a MoodLight. We love crazy names at WyoLum, and TiM is “The Intelligent Matrix”. We even tried building a controller for it called TiNA but it didn’t work out 🙂

dscn1788_26252600171_oTiM (The intelligent Matrix) is an array of 8×16 individually addressable 5050-WS2811 RGB “smart” pixels.  It is essentially 8 rows of 16 LED’s but with a very flexible connection scheme that allows you to control the whole array (128 LEDs) with a single pin or up to 10 boards (1280 pixels) chained together using 8 input pins. TiM boards can be linked together to create larger matrices. Stacking can be done in the vertical and horizontal orientations, and the pitch between individual LEDs is maintained when boards are stacked. Here’s the TiM User Guide.

dscn1793_26226395382_oI had two boards on hand, which I joined together to form a 16×16 matrix of 256 LEDs. TiM boards need an external controller, and I used an Arduino Clone that I designed for use at the Maker’s Asylum called MAPone (Maker’s Asylum Project #1). MoodLights require some form of user interaction, and I decided to use one push button (digital input) and one potentiometer (analog input). The whole thing is powered by a 5V wall wart.

dscn1799_26292824886_oFor the software, I tried some code I found on the web, but none of it did what I wanted – change modes by pressing the button, and change colors using the potentiometer. I can’t code if my life depended on it, so I chucked the problem at my go-to guys – Justin and Kevin. Justin is quick, like the Energizer bunny, and threw back code at me on the rebound. But it required using four potentiometer’s to control the colors. Since the HW was already wired up, I waited to see Kevin came up with something different, which he did. Nice code which allowed different modes to be selected by a button press. The first mode is the standard Rainbow colors from Adafruit’s StrandTest. Then, there’s a color changing mode, Breathing LEDs, Connection Machine (which looks something like Conway’s Game of Life), and finally a scrolling Text mode. This is enough to start with, and I’m sure if anyone at the Asylum wants to hack and dig in to the code, there’s a lot for them to play around with.

dscn1805_26363162042_oI designed the enclosure in OpenOffice Draw. A laser cut piece of MDF that wraps around the TiM PCB using some “living hinge” bends. I tried some junked 3mm MDF first, but the material was kinda bad – some parts cut well, while other areas were left with a charred and burnt top layer, so I had to scrap that. Next, I tried 5mm MDF that way lying around, and while it cut well, it was a tad thicker than I preferred and the hinges were stiffer being designed for thinner 3mm MDF. Anyhow, it worked and I was keen on just finishing this off. I also cut an additional square piece of 2mm white polypropylene sheet for the front diffuser. Most of the electronics was stuck in place using generous globs of hot glue. I added some hand drawn graphics to wrap it off, and left it at the asylum. Let’s see how they mount it up.

Here’s a video walk through of the MoodLight.


EDIT : Here’s a better walk through of the code by Kevin Osborn

MoodLight for TiM (The Intelligent Matrix)

This slideshow requires JavaScript.

Introducing VeloKey, the keyboard for your bike.

2015-02-28_0810260

Let’s face it, indoor training kinda sucks.  But our friends at Zwift.com have made it suck a lot less.  Actually they made it kinda fun.  Zwift allows you to ride with real friends and cyber friends in a virtual world.  You interact with the environment with (besides your bike) a keyboard, a mouse and a phone app.  It is great as is, but we’ve come up with a more intuitive interface we call VeloKey.

IMG_20160301_190323938

VeloKey is a Bluetooth interface to Zwift that consists of two a 1.8 inch dis,play thumbwheels, and a power up button.

VeloKey’s main screen allows you to navigate the Zwift world, and control the camera angles with ease.

IMG_20160301_192023109

Double-click the right scrollwheel to kick into Etch-a-mouse mode: left thumbwheel controls left-right mouse motions and the right thumbwheel controls the up-down mouse movement.  Pressing either thumbwheel acts as a mouse button.  Press both button’s in succession to get a double click on the connected computer.

IMG_20160301_193057374 (1)

Double click the left scrollwheel to activate the keyboard mode complete with caps, lowercase, letters and numbers, and don’t forget backspace.

IMG_20160301_193111135 (1)

VeloKey make riding indoors even more fun!

IMG_20160225_192746874

 

VeloKey is an Open Hardware project.  Download source files here.

WyoManiacal Display, no good can come of this!

Maniacal Labs has teamed up with WyoLum to make something amazing.

They’ve taken 24 TiM boards and assembled them into a 64×48 array of RGB addressable LED awesomeness with a refresh rate of 60 frames a second.

See the gallery below, sure, but don’t miss the opprotunity to see it in person March 13 at the NoVa Mini Maker Faire!

 

 

 

Pi Zero works with AlaMode and New Jessie Setup.

pi-zero-alamode

I confirmed today that the new Pi-Zero (super cheap/ super small new Raspberry Pi) works with AlaMode. As in the B+, the new GPIO connector is bigger than the old, but it’s less of a problem on the Pi-zero because of it’s small size. It’s a little hard to get a Pi-zero these days, but I managed to snag one as part of a “starter kit” from Adafruit, and since I needed the HDMI and USB OTG adapters anyway, It wasn’t a bad deal.

A help desk request came in saying there was something wrong with setup, and it turns out they changed the way startup happens in Raspbian between Wheezy and Jessie. Now getty is a simple service, and all startup services are controlled with systemctl

No more inittab, but you can download the new setup script: https://github.com/wyolum/alamode/blob/master/alamode-setup/jessie-setup
i
nstead of sudo ./setup, do sudo ./jessie-setup

I’ll eventually work the code back into regular setup, but I need to brush up on my bash-fu (unless someone else in the community wants to help?)