Cannot convert element to integer AGAIN and AGAIN and AGAIN

Do some debugging. Break your event blocks down to one action at a time to find where the problem is. You should be able to do most, if not all with companion app, without swearing :wink:

It's difficult to tell without the exact error message, but looking at the code "element 2" is most likely global channelA as it's the second element to the + operator and could be something other than a number. What is the value of global channelA?

Connect to Companion, right mouse click on these blocks, Do it

and post the results...

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.

export_and_upload_aia

.

that's what I been doing, I just dont get it, we should at least get a warning

what is the link between the companion app and my pc ????

it asks for a qr code, I scan the app qr code and it reinstalls my designed app, so what ?

going back to the web designer app, "do it" is greyed out

not the first time people tell me to click "do it" this JUST DOES NOT WORK

where is the code ?? scanning the QR just reinstalls the app

image

Scan or type in the six digit code
image

I dont have any code, where do I get one to connect to my app or whatever it is supposed to do ?
also I dont have the same screen as you, I might have installed the wrong app
why is this so cryptic ?.

Connect Companion

Using my PC's emulator because my phone's screen recorder is a pig
Enter the code

1 Like

I pasted a screenshot with the full diagram
I try to produce a byte and send it via BT

TDDCCCCC

T is 0/1 type
DD is direction , 4 values 00 01 10 11
CCCCC is the channel number

What is the range of Slider1?

Can you grab for us the exact error message?

Also, for debugging, can you grab that thumbposition and drop it into a global variable, to make it available to a Do It later on?
That would help capture the Make a List value in a Do It working off persistent global variables.

the slider is -255 -> 255

apparently the slave BT device receives the proper info, but sometimes I get this

Ah, the old binary conversion fraud exposed.

AI2 binary values are text strings composed of 0s and 1s, for demo purposes.

1 Like

but I am not sure I understand these nodes
image

a binary 10 is indeed 2, so maybe I should not use these convert thing
but then I'll get these cannot convert to integer error

-255 to +255 is more than a byte could bear.

Try 0 to 255 and truncate it to stay within unsigned byte values.

indeed, I'll have to math abs it

image

but that does not explain why 2 (decimal) is going "cannot convert to integer"

let's try this

YESSS !!
thank you so much guys

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