
Background:
I'm building a small WallE with an ioTiny and non EZ-Robot servos. I have updated the firmware on my ioTiny successfully. I am using a EZ-Robot 7.4 lipo battery in my robot to power everything. Because my servos can't handle 7.4 volts I am using 5 volt regulators individually for each servo.
My Problem:
In my project I added a servo Movement Panel and set the Left Wheel servo to D7 and the Right Wheel servo to D6. Everything seemed well with that as I could drive WallE around just fine.
But when I started to script some controls and I used the function "Forward( speed, milliseconds)" that's when it got buggered. For example if I used:Code:
Forward(100, 3500)
D6 would spin full speed forward and D7 would spin hardly at all forward. It did stop about 3500 milliseconds later, so the timing part works and it was forward-ish movement. It appears to be the speed that the ioTiny has having an issue with perhaps?
Another behavior with this command once I would ran it, if I went back to use the servo Movement Panel to drive my robot, the speed would be messed up with D6 going full speed and D7 barely spinning as if stuck under the settings of the script even though the script had stopped.
To fix that particular glitch I ran the script:
Forward(255, 3500) #running at max speed
which sent both servos forward at full speed correctly and it unlocked my servo Movement Panel to again have the proper controls.
Forward(100, 3500) was not the only speed setting I had an issue with. I tried other speeds and had similar buggered results.
Thoughts? Is this a "Justin" problem or an ioTiny problem?
Code:
360 servos may need their pot to be adjusted for equal outputs when compared to each other...
The speeds are weird in the sense that in the script we can set the speed from 0-255 but in the servo Movement Panel the range is 1-180 with 90 being off.
I'd do something like..
Code:
Or, i recommend using Blockly because it is a lot easier to program with than keyboards - and gives you the luxury of typing speeds into each block for each wheel.
When do you use Forward(speed, milliseconds)? Would you use it on a robot such as JD?