Kodular continiously send "0" after sending the first number

Hi Everyone,

I’m rather new with Kodular (using it a couple of days). I’m making an app to controll an arduino with bluetooth. I managed to make a layout and communicate with the arduino by bluetooth. But now comes the problem.
Once connection is made, everything is ok. But when I send a 2-byte number, the arduino receives the 2-byte number but after that it keeps receiving a “0” as 2-byte number. I tried sending a number in text format and that works. no zeros after the text is send…
Someone experienced the same thing? And how can it be resolved? (except for sending everythin in text and converting it to int in the arduino :slight_smile: )

This is the part managing the buetooth:

update: the arduino output:

Pushing the FLdown button and releasing it:
Received - 52 (4 sent as text is received as 52 in integer)
Received - 14
Received - 0 (0 received by arduino, but is not a result of releasing fldown)
Received - 0
Received - 0

pushing and releasing FLup (2x)
Received - 0 (0 that I sent received)
Received - 0 (didn’t send this one…)
Received - 10 (10 received when releasing)
Received - 0 (and again receiving unwanted 0…)
Received - 0
Received - 0
Received - 0
Received - 0
Received - 0
Received - 0
Received - 10
Received - 0
Received - 0
Received - 0
Received - 0
Received - 0
Received - 0

Instead of touch up , touch down try ‘click’ option with diff buttons for different functions and check the output

Thanx for your reply and your suggestion. In my case 2 different buttons won’t be possible because a push on the button activates a relay, and the relay has to be desactivated once I let the button go.
But I will try, just as test to see what it does.
Worst case I will send a text and convert it back to int…
I know it is possible to achieve what I want to do. i have a downloaded app where it works (also made in kodular or mit inventor)

update: found the problem. Even if the int in arduino is 2byte, you have to send 1 byte with kodular. hopefully this wil help someone in the future.

1 Like