|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Gyro interface to software
Posted by Lloyd Burns at 03/26/2001 2:20 PM EST
Engineer on team #188, Woburn Robotics, from Woburn Collegiate and TorDistSchoolBrd, ScotiaBank. OntPwrGen, Enbridge. In Reply to: Gyro interface to software Posted by Erik on 03/26/2001 1:08 PM EST: : Can someone give me a heads up on how to interface the gyro with software, ' Use the connector or solder directly to the pins of the gyro, but use pin 1 on the RI for 5 V, gnd on any analog gnd pin listed in the RI part of the manual, and signal to any input you like on the RI analog. The signal is contiuously variable from 0 V (variable "sensor#" = 0, where # is the number of the input corresponding to the pin in the Dx25 analog connector you're using - again, see the RI manual) to 5 V (sensor# = 254), and the output voltage is 2.5 V (sensor# = 127 give or take [connect up and take measurements on yours])when not turning. ' The manual should be downloaded and printed for study. It's on the Innovation First web site. : how to set up a variable to act as the input, ' set c_sensor# = 1 in the list, include sensor# in the list of variables (in the right order) in the SERIN command. If you want you can make an alias like "pitch VAR sensor#" or "yaw VAR sensor#" for easier programming. Samples are given in the manual, and the default program from the InnoFirst site. ' the PBASIC manual should also be studied. Goto www.parallaxinc.com for details. : is it digital or is it an analog signal, ' YES :-) , but see above : and if so is a simple if statement htat checks to see the value of the analog variable sufficient to use as a conditional starter for some automatic control of the robot? ' Yes, but you'll have trouble unless you specify a minimum value of pitch change - your robot may bounce enough, or the centre value may drift enough to trigger your balance routine. ' You might worry about direction of the pitch, too. "if (pitch > 147) then (goto) enoughthatway "if (pitch |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SCRRF Design Classes | Redhead Jokes | Southern California Regional Robotics Forum | 0 | 10-07-2003 17:29 |
| which software | Ryan Foley | 3D Animation and Competition | 5 | 01-03-2003 23:39 |
| Looking for operator interface... Where is it? | mike325 | General Forum | 2 | 07-01-2003 15:28 |
| software software software | archiver | 2001 | 5 | 24-06-2002 00:21 |
| Have YOU used the gyro chip? | FotoPlasma | Technical Discussion | 10 | 31-01-2002 13:26 |