Neopixel controller slave

Hi! I am working on a project where i have around 400 neopixels, and a few PIR that i want to control from a raspberry pi. And because the timing of the pixels and the voltage they need to operate. I opted to get an arduino as a slave device. Now i have a python script on the pi, that sends commands via the i2c protocol to the arduino. The only problem is the speed. It takes like 11 seconds to turn on 348 pixels. From the arduino it is pretty much instant. And i have calculated that the i2c shouldnt be the bottleneck. Do anyone have any idea what the bottleneck is. Or have any other ideas. I opted to use i2c because i don't have any logic converters. Btw here is my code:

and a few PIR that i want to control from a raspberry pi.

Just how do you plan to control an input device?

You should NOT be doing Serial.print()s (or, likely, a lot of the other stuff you are doing) in an interrupt service routine. receiveData IS in interrupt service routine.

I have a function that keeps the bus free and waits until one of the sensors are triggered. They are checked in the main loop, and just sends the value if the bus is open.

Nm this thread. I ordered a few level converters. So i won't need the atmega chip.