To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 2941
2940  |  2942
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)
  Re: Expression limitations w/bytecode
 
In article <13987.52974.46098.5...falo.edu>, Matthew D. Stock <stock@perdix.acsu.buffalo.edu> writes (...) Surely 34 10 0 0011 will subtract variables 10 and 11? (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

 
Verified and Trusted Team of Hackers
3 hours ago
Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR