Due to high demand, expect some shipping delays at this time - orders may not ship for up to 2-3 business days.
0

Trellis 40h protocol
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Trellis 40h protocol

by brianlight on Fri Apr 18, 2014 3:55 am

Wow thanks for optimizing the sketch... :-) my grid is extremely responsive compared to what is was... Kudos

brianlight
 
Posts: 38
Joined: Mon Dec 23, 2013 9:52 pm

Re: Trellis 40h protocol

by racs on Sun Apr 20, 2014 1:27 pm

No worries :) The sketch still needs some work though.

I do have a mac, but unfortunately I need my Uno for more important projects right now (read: school) so I won't be able to flash it anytime soon. But I see no reason why it wouldn't work.

I'm not sure I see the point of serialOSC anymore either... the vast majority of applications for the monome are written in max anyway, and (IMO) this is a much more convenient and modular solution. Plus Max doesn't run a permanent background client on your computer. If you don't have access to max the monomecereal patch can be exported as a standalone application, although I'm not sure if it would run on raspbian or not...

racs
 
Posts: 17
Joined: Thu Apr 03, 2014 2:43 pm

Re: Trellis 40h protocol

by brianlight on Sun Apr 20, 2014 7:38 pm

I agree the led portion of the code needs rewritten to support more monome serial commands & possibly as a hardware interrupt to speed that process up a bit.
I'm not really experiencing much lag on my Teensy 3.1 I think due to the faster clock speed. On my Arduino Micro there is some noticeable lag.

My Project Goal is to make a monome like device with all the computing power or sound generating hardware inclosed in it's project enclosure.
I've been experimenting with what you can do with Pure Data under Raspberry Pi witch is not much before audio starts to stutter or the Pi get's bogged down

brianlight
 
Posts: 38
Joined: Mon Dec 23, 2013 9:52 pm

Re: Trellis 40h protocol

by racs on Tue Apr 22, 2014 11:31 pm

Hmm I didn't know the Teensy had a higher clock speed, that's good to know. I thought most of the lag was due to the button debouncing as it delays the entire loop instead of just the button read as it stands right now. You can see this using the test patch - button on/offs are delayed, but manually selecting the LEDs is almost instantaneous. I seem to be getting some stuck LEDs too (button off messages not recieved), have you had any of these? I think this might be because I reduced the debouncing delay to 8ms instead of Adafruit's recommended 30ms.

That sounds like an interesting project though, having a self-contained unit. I've also played around with PD on the Pi and found it lacking on more complicated patches. However I had no problems at all with SuperCollider or CSound, if you want to get into command line synthesis. SC sounds great! and I'm pretty sure there's a quark for the monome

racs
 
Posts: 17
Joined: Thu Apr 03, 2014 2:43 pm

Re: Trellis 40h protocol

by brianlight on Sun May 04, 2014 4:26 pm

I've started laying out the Trellis along with a Teensy 3.1 in Fritzing to produce a PCB
Image

brianlight
 
Posts: 38
Joined: Mon Dec 23, 2013 9:52 pm

Re: Trellis 40h protocol

by racs on Wed May 07, 2014 3:01 am

looks good! Is that an accelerometer and MIDI outlet?

I worked on the sketch a little, adding the timer interrupt and row/col support. The row/col commands are pretty tough on the Trellis though, it only really works at lower baud (like 9600 or lower instead of 115200). I'm not sure how to go about improving it either... maybe a slight delay? I had to keep the other two timers enabled because they're needed for the button debouncing delay - although they could be disabled still. Definitely still needs some work! I had to update the monomecereal.maxpat too, so grab that if you want the updated sketch.
I also added the ADCs but I have nothing to test them with (yet).

here's the link: https://www.dropbox.com/sh/kf9kcoe7fel2ljr/LMBN_yPR5D

racs
 
Posts: 17
Joined: Thu Apr 03, 2014 2:43 pm

Re: Trellis 40h protocol

by brianlight on Mon May 12, 2014 1:37 am

I have an accelerometer and MIDI out on my breadboard circuit now. I've been playing around with gkuetemeyer Trellome sketch and thought that it would be nice to have both Monome emulation & borrow some things from the Sugarcube MIDI controller project by Amanda Ghassaei. And have the trellis Grid have multiple modes of operation. With monome serial out over usb one mode. Along with midi sequencer; 64 button keyboard; DJ midi controller & others. Wow no potentiometers or anything to wire up on the ADCs bummer....

brianlight
 
Posts: 38
Joined: Mon Dec 23, 2013 9:52 pm

Re: Trellis 40h protocol

by racs on Mon May 12, 2014 7:22 pm

Yeah I just picked up a pot today, so I'll check it out

I've updated the code a little - got rid of delay() so it's much more responsive, and uploaded it to github if anyone wants to take a look : https://github.com/rbnstubbs/trellis-monome/

racs
 
Posts: 17
Joined: Thu Apr 03, 2014 2:43 pm

Re: Trellis 40h protocol

by racs on Fri May 16, 2014 2:51 am

ADCs are working perfectly, but I'll have to add another case for the "tilt" command (accelerometer) - it seems to be a new addition to the 40h protocol. It isn't even in the arduinome code yet. I think it may have replaced the ADCs entirely?

racs
 
Posts: 17
Joined: Thu Apr 03, 2014 2:43 pm

Re: Trellis 40h protocol

by brianlight on Fri May 16, 2014 2:02 pm

I forked your git-hub repository on the Teensy 3.1 Timer Interrupts are handled a little bit differently. My Trellis grid is noticeibly much more responsive then it was previously.

Pot's on the ADC work wonderfully

I have an accelerometer on the ADC and with the Monome test maxpat accelerometer values are read but seems like it needs calibrated.

I'm getting ready to move my circuit of the breadboard but need an enclosure. I've been meaning to join my local hackerspace to have access to 3d printers & laser cutter.

brianlight
 
Posts: 38
Joined: Mon Dec 23, 2013 9:52 pm

Re: Trellis 40h protocol

by racs on Tue May 20, 2014 7:15 pm

I saw that, I also noticed you added setBrightness commands, somehow I missed those. I may have to try adding a single LED brightness commands to the Trellis lib.
If you're planning on 3D printing anything similar to my enclosure make sure you print slowly and onto a heated base. Large flat pieces are difficult for the printers as they are prone to uneven cooling and warping

Delay() is an arduino killer

racs
 
Posts: 17
Joined: Thu Apr 03, 2014 2:43 pm

Re: Trellis 40h protocol

by racs on Fri May 23, 2014 6:25 pm

new version is up. I just realized that they're using a new protocol ("mext" instead of 40h), which is where they /tilt comes from. I may go through the code and update it (shouldn't be too much work?) but I just picked up an accelerometer so for now I've added a workaround that will ONLY work with monomecereal.maxpat. Just use the Tilt button to enable, and check using the new trellis 40h test patch. I've also updated to the most recent Trellis XY lib, included in the git. LED brightness commands now work, but only for the whole board - ie. you can use it from the maxpat to set the board's brightness for any program.

https://github.com/rbnstubbs/trellis-monome

racs
 
Posts: 17
Joined: Thu Apr 03, 2014 2:43 pm

Re: Trellis 40h protocol

by racs on Wed Jun 11, 2014 8:40 pm

fixed some big bugs in the monomecereal patch, it was sending 2 commands to the arduino every one command it recieved... so it should be quite a bit faster now. also, I dunno if you noticed, but I took out the ISR as serial.read was introduced as an interrupt driven routine in arduino 1.0, so it was doubling the interrupts. I dunno how the teensy IDE works though, it might still need them.

by the way, I tried flashing my UNO as per the flipmu instructions. It doesn't work on the new rev.3 UNOs, as the USB chip has been updated. There's probably a way around that though

racs
 
Posts: 17
Joined: Thu Apr 03, 2014 2:43 pm

Re: Trellis 40h protocol

by brianlight on Fri Jun 13, 2014 2:40 pm

Looks like the trellis is going to be sold in a 4x4 Trellis kit with Trellis Led Controller; LED's; Pads & Laser Cut Enclosure. I'm hoping the laser cut enclosure is something that will be sold separately as well.

brianlight
 
Posts: 38
Joined: Mon Dec 23, 2013 9:52 pm

Re: Trellis 40h protocol

by john_na2 on Sun Aug 24, 2014 5:44 pm

Hey guys,

This is an awesome thread and I am soooo close (I think) to getting the hella oontz to work with it -- but I can get the trellis-monome sketch to load. It's complaining about "TileOffsets" having an incomplete type and since it's not declared in the sketch I'm guessing I'm missing some library? I have to admit I'm a coding nube and the syntax of

struct TileOffsets TileOffsets = {
{ 0, 4, 0, 4, 0, 0, 0, 0 },
{ 0, 0, 4, 4, 0 ,0, 0, 0 }
};

is voodoo to me...any help would be appreciated!
john_na2
 
Posts: 12
Joined: Wed Dec 18, 2013 6:42 pm

Please be positive and constructive with your questions and comments.