Trellis 40h protocol
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- brianlight
- Posts: 38
- Joined: Mon Dec 23, 2013 9:52 pm
Re: Trellis 40h protocol
Wow thanks for optimizing the sketch... :-) my grid is extremely responsive compared to what is was... Kudos
- racs
- Posts: 17
- Joined: Thu Apr 03, 2014 2:43 pm
Re: Trellis 40h protocol
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...
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...
- brianlight
- Posts: 38
- Joined: Mon Dec 23, 2013 9:52 pm
Re: Trellis 40h protocol
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
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
- racs
- Posts: 17
- Joined: Thu Apr 03, 2014 2:43 pm
Re: Trellis 40h protocol
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
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
- brianlight
- Posts: 38
- Joined: Mon Dec 23, 2013 9:52 pm
Re: Trellis 40h protocol
I've started laying out the Trellis along with a Teensy 3.1 in Fritzing to produce a PCB
- racs
- Posts: 17
- Joined: Thu Apr 03, 2014 2:43 pm
Re: Trellis 40h protocol
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
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
- brianlight
- Posts: 38
- Joined: Mon Dec 23, 2013 9:52 pm
Re: Trellis 40h protocol
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....
- racs
- Posts: 17
- Joined: Thu Apr 03, 2014 2:43 pm
Re: Trellis 40h protocol
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/
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
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?
- brianlight
- Posts: 38
- Joined: Mon Dec 23, 2013 9:52 pm
Re: Trellis 40h protocol
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.
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.
- racs
- Posts: 17
- Joined: Thu Apr 03, 2014 2:43 pm
Re: Trellis 40h protocol
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
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
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
https://github.com/rbnstubbs/trellis-monome
- racs
- Posts: 17
- Joined: Thu Apr 03, 2014 2:43 pm
Re: Trellis 40h protocol
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
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
- brianlight
- Posts: 38
- Joined: Mon Dec 23, 2013 9:52 pm
Re: Trellis 40h protocol
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.
-
- Posts: 12
- Joined: Wed Dec 18, 2013 6:42 pm
Re: Trellis 40h protocol
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!
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!
Please be positive and constructive with your questions and comments.