Hi,
I am working in the scratch compatibility with Moway Robot (www.moway-robot.com).
I have a C# program running and working fine. I use the Radiofrecuency communication between Moway Robot and the PC to send and receiver messages and real-time operation.
I have a possible problem with the sensor-update. I have several variables with the movement parameters speed, time, distance, etc..
The problem is that whenever I send an order to the robot I use a broadcast message (for example "straight") and take the values of the variables to perform the movement. If the variables don't change there is no "sensor-update" message. As this connection is working through and RF link it is possible to loose some information.
The question is. Is there any way of forcing a sensor-update to be sent?
Once we have finished we will post all the work to program Moway Robots using Scratch.
Thank you in advance.
Daniel del Río
Offline
Since Broadcast message names are sent out on the port - why not use the Join block to build a variable with your own message header and the variable value - and then just Broadcast the variable? I think that would work whether the value had changed or not.
when I receive [Straight v] set [Message v] to (join [Straight - ] (Distance)) broadcast (Message)
Last edited by Paddle2See (2012-10-05 06:21:57)
Offline
Thanks! Good idea! I will try this solution
Offline