Need help for optimization the blocks please

another question need help please.
I modified the Ball2 size, its OK shown on ai2, but offset on phone, why?
Thanks
Adam




JMMAGCOR_V5_3.aia (9.8 KB)

Maybe it's position is being reset in the blocks,
which would not be reflected in the Designer.

How do you set the ball positions?

1 Like

Wonderful! Thank you, ABG.
I modified the Canvos1 size and ball1 Radius but forgot to modify the global CenterX/Y.

Dear @lladam,
sorry but I missed your last messages, so I'm not pretty sure whether my hints have helped a bit ?
Generally speaking, to test a communication with efficacy, in my experience one of the most effective (and simple) way is to print out any message flowing between Tx and Rx, myabe in a text box. If your hadware is based on Arduino, you could use its serial monitor to verify what happens.
Otherwise, if everything is already working well, just keep my best wishes for a Merry Christmas !
Cheers, Ugo.

1 Like

Thank you very much uskiara
Sure your replies given me helps a lot, and I'll continue do the test you mentioned to improve my code.
best wish to you and Merry Christmas.

Another question, sorry maybe a silly one, is what function of the picture below is in the block page?
is it necessary of the 'when BALL2 TouchUp'? what will be if delete it?
Thanks

ball2.1

If in doubt
Rip It Out

(Hope you kept a Downloaded Blocks Image of that Event)

1 Like

Thank you ABG.
I disabled the TouchUp, the Joystick can't work smoothly, it is necessary to give the initial position.

The Joystick BALL2's movement sent data to receiver, but every time received different values and Frequency of data, is it possible to control the data sending Frequency?
Best

Yes.

Typically the Drag Event just sets a global variable, and the sending is done by a Clock Timer that watches the value of that global variable and does the sending regularly according to the Clock.

That smooths out the data flow across time.

1 Like

Great!
Thank you ABG.

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