| | Re: OO programing in RCX
|
| (...) I'm curious -- are you making it so you can think about your RCX program in OO terms, or just the VB program that sends opcodes? (25 years ago, 10-Jan-00, to lugnet.robotics.rcx)
| | | | Re: OO programing in RCX
|
| Hi Mathew, There are no objects on the RCX, in the sense that there are no vtables on the RCX. I made no changes to spirit.ocx. But I definitely think of the RCX code in terms of objects now. There are "brain" objects, "map" objects, "identity" (...) (25 years ago, 10-Jan-00, to lugnet.robotics.rcx)
| | | | Re: OO programing in RCX
|
| What I mean is to think the RCX in OO. For example, I can add a sensor object in my programming code when I plug a sensor into my RCX. I can make the sensor object to interface with the RCX object in the OO manner. Is that possible? I learned some (...) (25 years ago, 11-Jan-00, to lugnet.robotics.rcx)
| | | | Re: OO programing in RCX
|
| Hi Eric, Yes, I believe you could create a sensor object on the VB side and write your code thinking in terms of a sensor object. Here's one way: =-=-=-= BEGIN SAMPLE CODE =-=-=-= Private m_SensorNumber As Integer Private m_SensorType As Integer (...) (25 years ago, 11-Jan-00, to lugnet.robotics.rcx)
| | | | Re: OO programing in RCX
|
| Thank you, David. Your gode is great! I learned a lot from your quick example, though I prefer Java more. I will encapsulate RCX commands in some utility objects and use them in more higher level objects. What I focus now is make a RF/IR adapter to (...) (25 years ago, 12-Jan-00, to lugnet.robotics.rcx)
| |