RC and microBasic

6 years 9 months ago #29532185 by cory944
RC and microBasic was created by cory944
Dear Roboteq Technical support,

I want to be able to use RC radio control while microBasic script is running. I have RC command mode as first priority and serial data mode (microBasic) as second priority.

Is it possible to use a RC radio control while script is running? knowing the command modes I stated before.

Thanks in advance.

Regards,
Victor

Please Log in or Create an account to join the conversation.

6 years 9 months ago #29532186 by blake
Replied by blake on topic RC and microBasic
Hi Victor,

Serial mode as indicated in the command priorities is referring to commanding the controller via a serial source, such as your PC from Roborun+. This is not related to the microbasic script. If configured to auto run a microbasic script on startup, the motor controller will automatically begin running the script as soon as it is powered on, whether or not is connected to a serial device such as your pc or a micro controller.

So, yes you can use RC radio control while the microbasic script is running. Depending on what your application is you may need to include in your microbasic script to allow RC control to take place when a certain condition is met. For example if you are building a magnetic track guided agv then your microbasic script is likely using the data from a magnetic sensor to follow a track. If at some point you want to stop following the magnetic track and control your AGV with an RC controller, then you would need to include that condition in your script.
The following user(s) said Thank You: cory944

Please Log in or Create an account to join the conversation.

6 years 9 months ago #29532187 by cory944
Replied by cory944 on topic RC and microBasic
Hello Blake,

Let's say I have RC command mode as first priority and serial data (rs232,USB,MicroBasic script) as second priority, and some script is running and as soon I turn on my radio control then my motor will follow RC commands and script won't be able to command my motors, right?

Regards,
Victor

Please Log in or Create an account to join the conversation.

6 years 9 months ago #29532188 by cory944
Replied by cory944 on topic RC and microBasic
And more thing,

Yes I know serial data is referring to serial source as roboRun+ or a micro controller, etc. But as page 55 from manual indicates serial data as any RS232, USB and MicroBasic script signal then I referred MicroBasic script as serial data "signal"

But thanks for your clarification. It show your predisposition to help me.

Regards,
Victor

Please Log in or Create an account to join the conversation.

6 years 9 months ago #29532189 by blake
Replied by blake on topic RC and microBasic
Yes it should work as you describe. If you have RC as first priority and serial as second, then the RC control should take priority over the script when the RC transmitter is switched on.
The following user(s) said Thank You: cory944

Please Log in or Create an account to join the conversation.

6 years 9 months ago #29532191 by cory944
Replied by cory944 on topic RC and microBasic
Dear Blake,

Thanks for all your help, very helpful as always.

And sorry for all the basic questions, I just wanted to be sure.

Regards,
Victor

Please Log in or Create an account to join the conversation.

5 years 1 month ago - 5 years 1 month ago #29533521 by ccsgtech
Replied by ccsgtech on topic RC and microBasic
Hi Cory,

This code lets me control with a R/C remote while using scripts:

top:

pulse= getvalue(_pic,1) 'put pulse ch1 in variable
setcommand(_go,1, pulse) 'serial control of motor command with pulse input

Print("pulse=", getvalue (_pic,1), "\n")
wait (10)

goto top

Have fun

Carl

Please Log in or Create an account to join the conversation.

Time to create page: 0.068 seconds