As Easy As...

Here is an example that shows how to write a program to turn on a red LED connected to I/O Line #8.

  1. Create an oDio1 Object and give it an appropriate name. In this case lets call it "RedLED".
  2. Type the Sub Main() header and footer. "Main" is first procedure executed when the OOPic is turned on.
  3. Set the RedLED Object's IOLine property to 8. This will make the RedLED Object use the 8th I/O line on the I/O Connector.
  4. Set the RedLED Object's Direction to output. This make the RedLED Object control the voltage on the I/O line.

Now you can turn the LED on and off simply by setting RedLED to cvOn and cvOff.


Here is an example that shows how to write a program to control a RC Servo connected to I/O Line #15.

  1. Create an oServo Object and give it an appropriate name. In this case lets call it "SL".
  2. Type the Sub Main() header and footer. "Main" is first procedure executed when the OOPic is turned on.
  3. Set the SL Object's IOLine property to 15. This will make the SL Object use the 15th I/O line on the I/O Connector.
  4. Set the SL Object's Operate property to True. This will turn the servo on.

Now you can position the Servo simply by setting SL to a value.


-- Click here for more examples. --


    Send mail and comments to: Savage Innovations.