Upload Mode Broadcast: format conflict in value passed


Hey everyone and @tech_support
I am actually trying to upload my program in my mBot. When I try to upload it, it always gives me back that error: “cannot convert ‘String’ to ‘float’ in assignment } ^ Failed to compile file code.cpp arduino build failed.”.
This appens because I used the “Upload Mode Broadcast” extension to pass a value data from the sprite script. But it read the value as a string and not as number.
In particular, mBot code (in upload mode) try to put into a variable (that for mBot code is a numeric type) the value of broadcast message sent by the sprite (that the block of this extension considers to be of string type!).
Can someone help me?


What is your code?


It’s been a long time since I wrote this question and I no longer kept the non-working code, because it didn’t work and I reluctantly abandoned the project on my mBtot which consisted of processing data from computer to mBot and vice-versa.
However, the problem arises when you try to compile a code that has to make a sprite communicate with mBot through the “Upload Mode Broadcast” extension. Now I don’t remember exactly in which phase of the exchange this happens, but I think it was in the direction from Sprite to mBot: if a numeric value is sent from sprite, the extension on the mBot side accepts it only as a string and not as a numeric value, causing an error compilation.


Did you do anything like this:

If so, that could be your problem. Using the join block in combination with lists, variables, and some extensions can cause conflicts for the device. Normally, the same code principle will work fine on a sprite, however.


Use the extention “Advanced Arduino”


No… I used the UMB ext commands with variables


Wow this is new for me, I will try it. Thanks