I shall add this this project I'm working on to the hardware communications section once I get the documentation sorted out but in the mean time I have a small question concerning an equation.
I'm communicating with a
Scribbler robot using the Serial library. The major hurdle in this is the fact that I can't send a byte array to the bot because PBASIC reads byte arrays as an ASCII string. Java uses unicode so this complicates things. I got around the problem by sending the information piecemeal a bit at a time. Like I said - I'll post the documentation so anyone else new to communicating with PBASIC can have a crack. (The instant joy - just add Processing - factor has been the highlight of my week, this robot is really easy for stupid people, no,
really).
Anyhoo ->
I have a subroutine in the Scribbler hacked from the demo code for the robot. It takes speed for each wheel and a duration for movement.
In the demo, for 90 degrees left it uses:
motor_r = +50
motor_l = -50
move_time = 30
(Max speed of 100). So that works out as 3 degrees per move_time = 1 at speed = 50. Or PI/60 radians.
I'm trying to figure out the equation that spells out the relationship between degrees/radians, move_time and speed.
I'm not even close right now, could anyone offer any insights I'm hoping to build a class that will offer some precise control over the robot. (I'd build a library but I'm waiting for that page on Processing Hacks telling you how to build stuff in Eclipse to appear).