Shop OBEX P1 Docs P2 Docs Learn Events
Serial Communications with PropForth and the Parallax Laser Rangefinder (#28044) — Parallax Forums

Serial Communications with PropForth and the Parallax Laser Rangefinder (#28044)

I succeeded in getting my Laser Rangefinder working via a serial port in PropForth. Simple things are sometimes not so simple when you are missing some simple facts. When I succeeded in getting it to work, I documented my findings by adding comments to the term.f source listing from the extensions folder in the PropForth download. I think this will be useful to others searching for the same solution I was looking for.

Here is my updated fileDocumented%20Term%20PropForth.txt

Comments

  • I discovered an error in my writeup. It involves the word "sersetflags" In the file as I submitted it, the line was stated as
    "1 1 sersetflags" It should read " 1 4 sersetflags"

    The first number "1" is a flag, 1 for true, which means make the flag active. A "0" would reset the flag.
    The second number is the number of the cog running the serial driver, so " 1 4 sersetflags" would set the flag true for cog 4.

    Thanks,

    Steve
  • Your comments are great. I will try to add these (or set you up with permissions) when we get rolling on github.

  • Hi.
    Inside Word [c" 1 0 9600 4 / serial" 4 cogx], it is set to same as " 0 4 sersetflags".
    Please check SerialCommunication_20151103.pdf.
  • hinvhinv Posts: 1,255
    Have you guys seen this video:


    it uses this:
    http://www.banggood.com/3Pcs-KY-008-Laser-Transmitter-Module-For-Arduino-AVR-PIC-p-943280.html?p=2K090270884220140865
    and
    http://www.banggood.com/2Pcs-Laser-Receiver-Non-modulator-Tube-Sensor-Module-For-Arduino-p-944603.html?p=2K090270884220140865

    He was transmitting at 115200baud....pretty reliably...as far as I could tell from the music. I would love to see this done bidirectionally to see how fast a propeller could do it. On the Arduino, the next step is 230Kbaud if it is capable....on the propeller, no such limitation.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2016-08-04 06:06
    I've done that sort of thing for many many years, even using the "indicator" LEDs themselves as transmitters and receivers to access and configure various bits of commercial equipment including vending machines. But these days wireless is just as easy and better.

    BTW, I just remembered that one of the first pcbs I ever hand produced, dalo marker pen and hot ferric chloride, was for a helium-neon laser data communications "modem".
Sign In or Register to comment.