To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.pbforthOpen lugnet.robotics.rcx.pbforth in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / pbFORTH / 24
  RE: SENSOR_READ doesn't return 0
 
(...) AhA! Another victim within my clutches!!!!! Glad to hear you are trying things out, John. The more questions I get, the sooner I can get a FAQ out to help with the common ones. (...) That's a good sign, at least. (...) You have obviously had (...) (25 years ago, 13-Apr-99, to lugnet.robotics.rcx.pbforth)
 
  Re: SENSOR_READ doesn't return 0
 
(...) I am just dabbling at the moment, trying a few words to try and get them debugged. In order to fully port the SpeedBot (currently in NQC) I'll need multitasking... (...) Oh, good - I wondered if I'd got versions mixed up somewhere. It would be (...) (25 years ago, 13-Apr-99, to lugnet.robotics.rcx.pbforth)
 
  Re: SENSOR_READ doesn't return 0
 
More information: (...) CONSTANT is working - easy to check by doing RawLight . which prints 1 (...) This last line is the problem, if I use a SENSOR_MODE of 80 as in TRACKER.TXT then I get a SENSOR_READ of 0, if I use SENSOR_MODE 0 then I never get (...) (25 years ago, 13-Apr-99, to lugnet.robotics.rcx.pbforth)
 
  Re: SENSOR_READ doesn't return 0
 
..and now I have the answer, after extensive grepping around Kekoa's disassembly and the pbFORTH .ASM files. SENSOR_READ should return only the bottom byte, the call to 0x14C0 only returns a byte so the high byte contains garbage (actually it seems (...) (25 years ago, 13-Apr-99, to lugnet.robotics.rcx.pbforth)
 
  RE: SENSOR_READ doesn't return 0
 
(...) OOPS, that SHOULD read 0x0080 since the mode is a BYTE value. Overzealous urge to get content into the website is to blame. For the light sensor, I generally use the percent of scale mode. My website has a page on tricks with the light sensor (...) (25 years ago, 15-Apr-99, to lugnet.robotics.rcx.pbforth)
 
  RE: SENSOR_READ doesn't return 0
 
(...) John, Thanks a lot for this catch. Sounds a lot like the email I exchanged with Kekoa regarding power down mode and external stacks, but that's another story... Cheers, Ralph Hempel - P.Eng ---...--- Check out pbFORTH for LEGO Mindstorms at: (...) (25 years ago, 15-Apr-99, to lugnet.robotics.rcx.pbforth)
 
  Re: SENSOR_READ doesn't return 0
 
Actually, whils I am re-coding things, is there any reason why you didn't do DELAY like this? : DELAY ( 100msec timer -- ) 0 OVER TIMER_SET SWAP ( timer ticks ) BEGIN OVER TIMER_GET OVER > ( timer ticks time>ticks ) UNTIL 2DROP ; I have produced an (...) (25 years ago, 15-Apr-99, to lugnet.robotics.rcx.pbforth)
 
  RE: SENSOR_READ doesn't return 0
 
(...) There are indeed many ways to skin a cat...in the end , the effect is the same, but I'm always curious to see how others do things. How many FORTH programmers does it take to screw in a light bulb? Just one, but he has to be the fellow that (...) (25 years ago, 16-Apr-99, to lugnet.robotics.rcx.pbforth)
 
  Re: SENSOR_READ doesn't return 0
 
(...) Well, I think your progress so far is very good, I can understand the odd slip-up, it keeps us on our toes. If I get anywhere with the LCD constants for the complicated segments I'll let you know. (...) Because I am trying to reproduce (...) (25 years ago, 16-Apr-99, to lugnet.robotics.rcx.pbforth)

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