Subject:
|
Expression limitations w/bytecode
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Tue, 19 Jan 1999 00:46:11 GMT
|
Original-From:
|
Matthew D. Stock <stock@!saynotospam!perdix.acsu.buffalo.edu>
|
Viewed:
|
1207 times
|
| |
| |
As I understand it, the bytecode interpreter doesn't allow you to do fairly
simple things like subtract two variables from each other. That makes
doing comparisions between sensors somewhat challenging if you want to know
the magnitude of the difference.
It seems to me that there are two options. I can either solve it in a
hardware sort of way (much like the differential light sensor Michael
Gasperi designed), or by replacing the firmware. The firmware option is
the most tempting, but it doesn't appear that the replacement firmware
options are quite there yet (someone correct me if I'm wrong).
Anyone have any suggestions on how to deal with this? Should I look into
developing yet another firmware solution? :-)
Thanks,
-Matt
--
Did you check the web site first?: http://www.crynwr.com/lego-robotics
|
|
Message has 3 Replies: | | Re: Expression limitations w/bytecode
|
| (...) The firmware does support basic arithmetic operations. You can use them in NQC like this... int a, b; task main { a = IN_1; b = IN_1; b -= a; } Dave p.s. As a side note, NQC does not support stuff like "a=b+c", but this is due to concurrency (...) (26 years ago, 19-Jan-99, to lugnet.robotics)
| | | Re: Expression limitations w/bytecode
|
| (...) The supplied programming environment does not allow you to subtract one sensor value from another, but the bytecode interpreter does. See: (URL) see NQC, as Dave Baum pointed out. You do not have to resort to replacement firmware unless you (...) (26 years ago, 19-Jan-99, to lugnet.robotics)
|
7 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in Robotics
|
|
|
|