Using mBlock variable


#1

Dear All,

I’m using mBlock to program an Arduino UNO.
Sprite N. 1 says the status of a button (1 or 0) while Sprite N. 2 says the distance mesured using a ultrasonic sensor.

Sometimes the Sprite N. 1 says the distance.
I cannot figure out why?

Could you help me?

Many thanks
Marco


#2

Don’t use multiple sprites in mBlock, AFAIK this will not run correctly.