Multiple AC Dimmer

Hey guys, I am working on a multiple AC dimmer. I used this code from someone else and modified it a little. I am using the code attached, it requires me to put in to the serial port "D/0/40/F", 0 channel at 40% brightness. I have messages from max that need to be sent to the arduino over the serial port. It works when I have one set up but as soon as both messages are simultaneously firing the process slows down a ton and gets tripped up. I was wondering if this is a serial port latency problem or if this is more or less a problem with messages colliding. I also dont know if this is the best way to pursue this or not. I want to do 88 lights, which would require about 11 arduino's with 88 seperate bread boards for each dimmed light. Is this the best way to pursue this? I am trying to cut down on costs... idk if there is any other solution. I looked at some DMX hardware but it all seems pricey with only a couple channels offered. Any ideas?

Thanks a ton guys!

It works when I have one set up but as soon as both messages are simultaneously firing the process slows down a ton and gets tripped up.

It might depend on how the Arduino is handling (parsing/decoding) messages. Can you successfully send one message adressing one lamp, and after a pause send a 2nd message to the 2nd lamp?

What does it mean that the process slows down? Is there a latency (delay) between the time the message is sent and when the lamp reacts?

Is there a chance you are overflowing the serial input buffer while the Arduino's brain is off doing something else (like dimming a lamp or decoding the message)? I think the buffer is 128 bytes, so I don't think you should overflow it with two DMX messages in a row...

After going through some more experimenting it seemed the problem was messages colliding. When two would collide it would send a Code Unknown to the arduino delaying the process. The process is still not at real time because I have a gate in max switching extremely fast between the two messages so they dont collide. But it is more real time. I dont think it is a latency issue, overflow of the serial port might be a problem when i try to hook up around 8 with one arduino. hopefully not....