Close

Resurrection

A project log for Interactive Color LED grid with IR touch sensing

My wife wanted some hardware to program with processing. I wanted to design some PCBs

engunneerengunneer 01/21/2018 at 18:402 Comments

After a ling delay, this project is being resumed. As of yet, I have not been able to get a working diffuser for the front that is transparent to IR for the touch sensing and semi-opaque or translucent white for the colors. Since the LEDs work well enough and I already have a frame for the assembly, I'm moving on to just making it a programmable art display.

I installed a 5mm thick light diffusion panel in the front, and finally drilled holes to mount the board in the frame with small screws. The resulting gap is about 40mm between the front of the LEDs and the back of the diffuser.

I also picked up a Raspberry Pi Zero W to use as the main CPU. The Pi will run Processing on Rasbian, and will

be connected to the Teensy CPU as before for serial communication. While reading about the methods for getting processing running on a Pi, I saw tey mention a "Upload to Pi" tool that solves a few problems that I was seeing coming up. I had worked out a whole scheme for having the Pi read files from my NAS to determine which sketch to execute, then would have had to figure out enough linux to get it loading properly automatically and when files changed for development. The Upload tool appears to cover ALL of this for me, so this post is laregely going to be setting up this tool and getting it working on a fresh laptop and a fresh Raspian. This list will also be for my reference in the future.

Honestly, that was about it. As I test I used the DepthSort example that comes with Processing, and I uploaded it to the Pi while I had a screen attached, and it. just. worked. I even rebooted the pi, and the sketch started again automatically!

Next was to to get it working with the test sketches I had written in the past to talk to the Teensy. I updated the code on the teensy to take a sixth byte per pixel (whether to interpret the bytes as HSV or RGB) and to take a brightness command via a magic pixel (with an x index of 100).

I made a minor tweak to the test Processing sketch to send along the sixth byte and to set the brightness. After figuring out which serial port index to use, it also just worked!

Pictures to come.

Discussions

hondaman900 wrote 04/12/2018 at 17:11 point

Thanks for the notes. I was looking for instructions on how to use the Upload To Pi tool, and found your post. I have a large sketch I want to port to a Pi. Do you know if the Upload To Pi tool needs the Raspian + Processing image on the Pi, or will is export to a regular Raspian SD carded Pi and work?

  Are you sure? yes | no

engunneer wrote 04/12/2018 at 17:31 point

I'm honestly not sure. I just used the Processing image because it was a fresh pi, and didn't have anything else i needed to install. It's probably possible to configure the plain image to do it, but i expect there to be a background service or daemon listening for the incoming connection?

Looking at the processing instructions, I do see this:

"Alternatively, if you already have an existing installation of Raspbian you want to keep, you can install Processing by running the following in a terminal:

curl https://processing.org/download/install-arm.sh | sudo sh "

it also looks like the upload tool just does an ssh connection to the pi and sets everything up there.

  Are you sure? yes | no