Serial Communications with PropForth and the Parallax Laser Rangefinder (#28044)
Steve_Hatch
Posts: 19
in Propeller 1
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 file
Here is my updated file
Comments
"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
Inside Word [c" 1 0 9600 4 / serial" 4 cogx], it is set to same as " 0 4 sersetflags".
Please check SerialCommunication_20151103.pdf.
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.
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".