|
Need PBASIC Balance Code Quick
By the end of today I need some PBASIC code that will at least attempt to balance this vehicle I am working on. The Demo code for the tilt sensor is here http://www.parallax.com/dl/src/prod/...25democode.zip I am only using the Y axis.
My motor speed controls are on pins 12 and 13. I need the speed of the motors to increase proportionally as the angle of tilt increases. The motor controller needs to get a PULSOUT signal. 950 full speed one direction, around 750 is neutral, and about 550 is full speed the other direction. It needs to pause for 20ms between pulses. The tilt angle will be no more than about 6 degrees in each direction. If we can use the straight gyro output instead of converting it to degrees the BASIC stamp will run better because it gets a little bogged down with that.
It is a BS2 I am using.
If you have any more questions I'll be able to answer them at about 3:30 PM pacific time today. I need to have this code hopefully by 8:00 PM pacific time today.
If someone can help me out ina pinch it would be most certainly appreciated.
__________________
Teacher/Engineer/Machinist - Team 696 Circuit Breakers, 2011 - Present
Mentor/Engineer/Machinist, Team 968 RAWC, 2007-2010
Technical Mentor, Team 696 Circuit Breakers, 2005-2007
Student Mechanical Leader and Driver, Team 696 Circuit Breakers, 2002-2004
|