Subject:
|
Re: Newbie Question - Programming the Scout
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Thu, 30 Dec 1999 08:14:49 GMT
|
Viewed:
|
954 times
|
| |
| |
In lugnet.robotics, "Jeff Buckey" <jbuckey@earthlink.net> writes:
> The SDK doesn't
> really give any good examples of how to use this command (opcode) and I'm
> not sure what to pass it as a parameter.
ScoutDef.h is heavily commented and should make it a little clearer. Look at
the EVENT_* defines.
> Should I AND the hex values (or their binary equivalents) for TOUCH1 and
> TOUCH2 together (using a #define maybe?) and then use that as the second
> parameter? Something like:
> #define SEN_BOTH_MOTORS 0x0001 & 0x0004
> mone SRC_CON, SEN_BOTH_MOTORS, GoHere
First you mean OR, not AND. Those are the right numbers (EVENT_T1PR and
EVENT_T2PR). You could use EVENT_T1PR | EVENT_T2PR, or you could use the
predefined constant EVENT_TPR. In fact, this very example is in the SDK.
--Ben
|
|
Message is in Reply To:
| | Newbie Question - Programming the Scout
|
| Hello all, I'm new to this list and to Lego Robotics as I just received my first Lego Discovery Kit for my birthday a couple of weeks ago. When I learned that I could buy an IR tower to allow the Scout to communicate with my PC so I could write my (...) (25 years ago, 29-Dec-99, to lugnet.robotics)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in Robotics
|
|
|
|