PDA

View Full Version : Pbasic I/O with the OI


BinaryBob0001
01-18-2002, 01:23 AM
I'm trying to figure out how all the inputs and outputs are transferred into the control unit for the robot. Are they all stored in the pre-defined variables? And is there a way to change the pre-defined variables? Thanks for the help.

Lloyd Burns
01-18-2002, 06:40 AM
The values are read in from the various sources in either of two ways.

The two-terminal resistance of the joysticks, the "wheels" and the auxiliaries with a tricky "discharge a capacitor and count how long it takes to get back to a threshold voltage" charge-timing circuit A la IBM game port {see also Apple ][ and later}; the digital inputs just feed into a shift register and are clocked in.

The Innovation First program just sucks it all in, and blows it all out in a programmed order which avoids having two successive bytes of 255 (see the PBasic argument thread). The RC input program takes the bytes in, in the same preprogrammed order, and then passes the user-selected (CON = 1) bytes to the Stamp, in the order ordained in the SERIN statement.

Can you mess with it ? no. Should you mess with it ? NO! It is because it is so "out-of-your-hands" that you may have such wide latitude in your choice of input controls. Nothing can go wrong.*

* explanation
refers to a joke from the age of Dinosaurs: the airplane PA system comes on: "Good Afternoon, Ladies and Gentlemen. This is a recording (on a disk with grooves - pre Jurassic). This airplane has no pilot. Through the Wonders of Modern Science, a computer will fly this airplane from takeoff to landing. Nothing can go wrong ..putt! (as the needle ships back a groove).. Nothing can go wrong ..putt..!"

GhettoTech
02-16-2002, 11:16 PM
Can you mess with it ? no. Should you mess with it ? NO! It is because it is so "out-of-your-hands" that you may have such wide latitude in your choice of input controls. Nothing can go wrong.*

You can mess with the input and output variables
And if you learn what you're doing, then yeah you should mess with it.

I'm trying to figure out how all the inputs and outputs are transferred into the control unit for the robot. Are they all stored in the pre-defined variables? And is there a way to change the pre-defined variables? Thanks for the help.

The default code explains what each varable is used for when it is declared in the program. The SERIN command at the begining of the program's "MainLoop:" is what takes the information from the OI and stores the information in each of the variables. The program runs and does what it does with each variable. Then, the SEROUT command at the end of the program's "MainLoop:" sends the appropriate signals to the appropriate outputs on the RC.
If you'd like more help with any specific inputs or outputs, feel free to AOL IM me (SilverSonic105) or e-mail me (Ghetto@techie.com).

GhettoTech
02-16-2002, 11:19 PM
And if you learn what you're doing, then yeah you should mess with it.

I ment to say "if you want to" at the end. The Innovation FIRST control system and default code is very well designed and will work perfectly well without much tampering :)