Apk slower that AI companion

Hello!
So I am Developing a program that let's me control the rgb lighting in my room over Bluetooth. A fairly easy program with 3 sliders. I used the AI companion while developing. The program run smoothly. Then after building the app (android) and istalling on the same device, the program became luggy (just an incredibly big delay. miliseconds -> 10 or more seconds). At first I thought it was the arduino and the delay of the arduino serial communication but after usin the AI companion again the program run smoothly.
Thanks in advance
RGB_controller.aia (5.4 KB)

For the sake of the other thread watchers, here are your relevant blocks:
Clock1

I notice from your slider event blocks that you send whenever the thumb moves. That can happen very frequently during a single movement, so it might be overwhelming the data stream with data. Maybe a built app is faster than the Companion, so it builds up a backlog faster.

You could use a fast Clock Timer to throttle your sending, sending only as fast as the Clock interval, only when new values are available for your color codes.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.