lathoub / Arduino-AppleMIDI-Library

Send and receive MIDI messages over Ethernet (rtpMIDI or AppleMIDI)
Other
309 stars 66 forks source link

to big for arduino uno #27

Closed Afaassen closed 8 years ago

Afaassen commented 8 years ago

I have tested on a uno but keep getting messages that the programm uses to much space. Have tested earlier with a mega board which was succesfull but now need to add two more arduino uno's for making three points to detect movement and trigger sounds.. Only use note on/off what can i do to smallen the classes without breaking the functionality?

Thnks in advance..

lathoub commented 8 years ago

Correct Afaassen, the library doesn't fit the Unoanymore. I'm rewriting some of the classes to safe space, but can't promise anything. Try removing all strings (but believe that most are already in #ifdef) and remove all but NoteOn``NoteOfffunctions - but not sure if that will work. The Megais your best bet for the moment.

Afaassen commented 8 years ago

yes i wanted to try this..today i orderd 2 extra mega devices instead. I hope i can use the three on one router to interact with my single mac? I think i only needed to change the mac adress not?

Super.. thanks for the advice and quick reaction! your script is awesome and helps me loads! Thumbs up!

lathoub commented 8 years ago

Good to hear the library works for you :-)

And yes, multiple sessions can be run on the same network - just change the MAC address when you call Ethernet.begin(mac)

Afaassen commented 8 years ago

:-) 👍

Afaassen commented 8 years ago

Hi me again..ugh i bought two extra mega's and two extra ethernet 2 schields...now these shields are not supported i think..:-( is there any way to support those..?

lathoub commented 8 years ago

Oh no. Indeed, supporting the Ethernet 2 shields is not on the roadmap. It would mean switching the IDE of Arduino.org - something I do not want to do. Sorry.

Your experiencing the downside of the Arduino split... (I have a couple of .org hardware that I can't use - your not alone).

The original .cc shields are hard to get by, I recently ordered these http://www.banggood.com/Ethernet-Shield-W5100-R3-Support-PoE-For-Arduino-UNO-Mega-2560-Nano-p-907969.html?cur_warehouse=CN and work OK.

Afaassen commented 8 years ago

AAAARGH...ehehe..it seems to work sometimes when i connect but havent get them working all three together..2 at most but three didn't show up in the midi network of the mac.. You sure if i order this one it works? https://benselectronics.nl/w5100-ethernet-shield/ i could order them today again and possibly get them by tomorrow

Afaassen commented 8 years ago

i have one of those and two ethernet 2 shields..

lathoub commented 8 years ago

the link points to Arduino.cc, so that sounds good (but I can't guarantee it, never worked with that board)

Afaassen commented 8 years ago

it works with one of them.. actually if i programm the other two with the ethernet 2 library it also works sometimes..but havent got it working with 3 yet..was 03:00 yesterday when i gave up..ugh

Afaassen commented 8 years ago

Last question before i give up..

I have 3 arduino's on a router. Router is in contact with laptop. All wired on lan. All arduino's have a diff mac adress and dif ip.. Also detected in router. Session in aplle only sees the first arduino i give power to in the session. the rest don't show up. Is it really possible to see more arduino's(participants) in 1 session? i am not sure anymore if this is.. thnks.. Maybe it is a router problem?

So even the ethernet shield 2 devices show up and work.. but only always one of the arduino's is detected as participant in the session.

lathoub commented 8 years ago

Just have to manually create 3 remote peers in the directory list in rtpMidi (assuming you are on a PC using rtpMidi) - once created, you manually have to connect to them. The Arduino's do not automatically appear in the list, unless you add the Bonjour protocol to your application.

This should work, i have used up to 4 Arduinos at once without a glitch.

Afaassen commented 8 years ago

i am using a mac.. can it not be done with 1 mac only?

lathoub commented 8 years ago

Sure! Create 3 manual entries in the Directory. Each pointing to an individual Arduino (assuming they have unique IP's). Once created in the directory, you should be able to connect to them

Bluebie commented 8 years ago

29 should help free 256 bytes of stack memory on Arduino Uno.

lathoub commented 8 years ago

29 indeed make the lib compile and run again on an Arduino Uno (the NoteOnOff sample uses 79% os program storage space and 67% of dynamic memory). Stay tuned as #29 becomes available

lathoub commented 8 years ago

31 makes it fit onto an Uno again. Thanks @Bluebie