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 / 18
    Ir transmission —Benoit Cerrina
   Hi, is there any way to send IR messages using pbForth. This is in order to use the IR proximity detector commonly used with nqc programs. Also I think that with alternative firmware such as pbForth and nqc, it should be possible to do it without (...) (25 years ago, 29-Mar-99, to lugnet.robotics.rcx.pbforth)
   
        RE: Ir transmission —Ralph Hempel
     (...) YES!!! The standard FORTH word U. prints an insigned integer, while EMIT sends out an arbitrary byte. So, for a simple IR proximity detector, you would write something like: HEX 0 SENSOR_ACTIVE (labelled sensor #1) 3 1 SENSOR_TYPE (light (...) (25 years ago, 30-Mar-99, to lugnet.robotics.rcx.pbforth)
    
         Re: Ir transmission —John Cooper
      (...) Perhaps EMIT? would do (...) I'm nearly done with my NQC to pbFORTH port of the IR proximity detector, but I'm stuck where I have at present got a 30ms delay (Sleep(3) in NQC). I expect it isn't critical but the current detector works so well (...) (25 years ago, 14-Apr-99, to lugnet.robotics.rcx.pbforth)
     
          RE: Ir transmission —Ralph Hempel
      (...) Alas, I only used the firmware timers available as core RCX firmware calls. I can look through Kekoa's disassembly to see if there are higher resolution timers available ( I think the motor timers might be useful ) In general, NQC hooks in (...) (25 years ago, 15-Apr-99, to lugnet.robotics.rcx.pbforth)
     
          Re: Ir transmission —John Cooper
      (...) The bytecode interpreter does it, which is what NQC maps to (opcode 43). I'd prefer a timer (or access to a clock) with millisecond resolution rather than a delay because things will get interesting whan multitasking. What is the CPU clock (...) (25 years ago, 16-Apr-99, to lugnet.robotics.rcx.pbforth)
     
          RE: Ir transmission —Ralph Hempel
      (...) I think its around 16 Mhz for the crystal and 4 MHz for the cycle time. I think there is a msec timer buried in the OC1A handler (see Kekoa's disassembly) I agree that we want something to trigger a run flag instead of having to check the (...) (25 years ago, 16-Apr-99, to lugnet.robotics.rcx.pbforth)
     
          Re: Ir transmission —John Cooper
      (...) Well, in the spirit of FORTH there should be no finite number, just create and destroy them on the fly as and whan you need them. I have been wandering around the internet looking and found that hForth has one already: \ hForth multitasker \ \ (...) (25 years ago, 17-Apr-99, to lugnet.robotics.rcx.pbforth)
    
         Re: Ir transmission —John Cooper
     (...) I can't get EMIT to work, in NQC I do this: SendMessage(255); // Flash Sleep(3); ThisRaw = RAW_LIGHT; and the raw light sensor reading has big spikes for IR reflections. but: [ HEX ] FF EMIT 30 msWait RawLight LIGHT? does not, I think that (...) (25 years ago, 10-May-99, to lugnet.robotics.rcx.pbforth)
   
        Re: Ir transmission —John Cooper
   (...) My next project is to port the IR proximity dectector originally posted by Mark R. David (markdavid@mediaone.net) in sort-of-Spirit code which I reposted in NQC whan I had got it working. It is the best performing detector I have found so far. (25 years ago, 4-Apr-99, to lugnet.robotics.rcx.pbforth)
 

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