BS2 SERIN Pin 16 Problems
staulkor
Posts: 5
I am learning how to use SERIN and I am having a problem with my computer communicating with the BS2.
Note: I have a HomeWork Board
What I would like to do is have a perl script I wrote command the BS2 to turn on the LED.
My plans are to have my BS2 control 2 servos that are the pan and tilt mechanism for a camera which would be controlled over the web. I was hoping to use a perl script to control the BS2 over /dev/ttyS0 on my linux web server.
Currently, I am just trying to turn on an LED and go from there. I see no point in writing the entire servo control software and find out I cant tell it what to do [noparse];)[/noparse]
Any help would be greatly appreciated!
Note: I have a HomeWork Board
result VAR Byte DO DEBUG "Hello!", CR SERIN 16, 84, [noparse][[/noparse]DEC result] HIGH result LOOP END
What I would like to do is have a perl script I wrote command the BS2 to turn on the LED.
My plans are to have my BS2 control 2 servos that are the pan and tilt mechanism for a camera which would be controlled over the web. I was hoping to use a perl script to control the BS2 over /dev/ttyS0 on my linux web server.
Currently, I am just trying to turn on an LED and go from there. I see no point in writing the entire servo control software and find out I cant tell it what to do [noparse];)[/noparse]
Any help would be greatly appreciated!
Comments
·· If you are, indeed, opening a DEBUG window in that program, you won't be able to get data through the port because the DEBUG window will have the port.· Also, you should set your baud rate parameter to 16468.· Since you're using virtual port 16 it will be done for you (that port always assumes inverted mode) but so your code is clear you should use the inverted value.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Here is my perl script that I am using to try to turn on the LED... (The green light on the board also blinks as I run the script)
And when I use the script, the light blinks, but the LED does not turn on.
Dump the ODD Parity and make it NONE.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->