Servo Input, obex, is not cooperating
garyg
Posts: 420
Hi
It's been a few years, but here I go again.
I downloaded from the OBEX, Servo Input by David C. Gregory.
I wired the RC Servo Receiver I have into my QuickStart board.
I cannot get it to display anything.
My Transmitter is turned on and I get an LED on the receiver saying it should be working.
My end game here is to find center position on my XQ servo which should be 1500uSec.
..
The Servo Input Demo requires the use of ServoInput, vga_text and Numbers objects which I downloaded
and placed them all in the same directory.
..
It is very likely that I don't understand something very basic.
I'm trying to use the Parallax Serial Terminal to display the pulselengths, but that also
does not appear to cooperate.
..
I'll attempt to attach the zip file that I downloaded from OBEX.
It appears that the zip files will be here.
I know I'm being quite vague here.
Maybe a question or two from someone who might be familiar with situations like this
would help me to elaborate in a more understandable manner.
..
Thanks in advance for any words of wisdom, questions, etc.
Garyg
It's been a few years, but here I go again.
I downloaded from the OBEX, Servo Input by David C. Gregory.
I wired the RC Servo Receiver I have into my QuickStart board.
I cannot get it to display anything.
My Transmitter is turned on and I get an LED on the receiver saying it should be working.
My end game here is to find center position on my XQ servo which should be 1500uSec.
..
The Servo Input Demo requires the use of ServoInput, vga_text and Numbers objects which I downloaded
and placed them all in the same directory.
..
It is very likely that I don't understand something very basic.
I'm trying to use the Parallax Serial Terminal to display the pulselengths, but that also
does not appear to cooperate.
..
I'll attempt to attach the zip file that I downloaded from OBEX.
It appears that the zip files will be here.
I know I'm being quite vague here.
Maybe a question or two from someone who might be familiar with situations like this
would help me to elaborate in a more understandable manner.
..
Thanks in advance for any words of wisdom, questions, etc.
Garyg
Comments
P8-V
P9-H
P10-B0
P11-B1
P12-G0
P13-G1
P14-R0
P15-R1
Then connect a VGA monitor to the port on the left side of the board and run the code.
Your three responses to my troubles helped very much.
Usually I can get some type of functioning when working with OBEX objects.
My microcontroller skills are more than a bit rusty, but I do keep going once I've started.
The only microcontrollers I have at the moment are a couple of RevA Quickstart boards and a Prop Mini.
I do also have a couple of Parallax LCD displays- 2 line that I've used in the past.
I'm thinking that I picked something from OBEX that sounded simple, but for my situation is not.
Now that I know about the VGA thing, maybe I can do something that will work out for my situation.
It seems that it should not be very difficult to measure incoming pulse width and display it in microseconds.
I will revisit the OBEX to see if there is a simpler situation that I can use.
Thank you very much for your efforts in helping.
Garyg
Looking through OBEX I found another pulse measuring code.
It's called PulseTimeTapA.spin
I put it on my Quick Start board, connected my radio receiver.
I get an output on the PSC showing that the pulse duration is 14121uSec.
This pretty much makes sense, but that pulse duration does not
appear to change no matter where my radio steering wheel is positioned.
I think it should be changing as I rotate the steering wheel.
I'll try to attach what I'm using.
Maybe the code does not work the way I'm thinking it should.
Any comments would be greatly appreciated.
..
I still need to center my XQ servo at 1500uSec.
I cannot rotate the shaft by hand, as it is geared very low internally.
DISCLAIMER: I have no way of testing this, so I have not done so. This code is raw, untested Spin.
I have set this up with an LCD on pin 0, at 19200 baud. There is also an LED set up on pin 1. If this LED starts blinking, something is wrong with the LCD init code and one of us screwed it up.
The pin usages and baud rates can be adjusted in the main CON block, and you don't NEED the LED. Just make sure it is on a pin that is unused otherwise. My code should activate the backlight on the LCD.
Let me know if there are issues and I will do my best to fix them. Attached are my modified demo and the chain of lcd programs, in case you lack them.
I'll try this tonight on my QuickStart and Parallax LCD.
I'll post again with result.
Garyg
Things don't work as I had hoped.
In the ServoInput_DEMO_for_LCD.spin
I don't see where the LCD is initialized.
What happens is this.
LCD place marker is displayed.
After about 4 or 5 seconds, I can see some activity on the bottom of the second line
But I really have to hunt for it. It's like fast oscillating _
Then after about another 5 or 10 seconds the LCD place marker is displayed.
No other activity happens.
..
In the past, whatever I did with the LCD's, I always used
the FullDuplexSerial.spin object.
If I remember correctly, one of the Parallax guys had told me that Simple Serial
would not work with my LCD's. I followed his instructions and everything worked.
I've used that setup every time I used my LCD's without trouble.
The following is exactly what I've used in the past to get the LCD to cooperate.
In my test rig, Pin 8 is the TxPin.
I don't remember the significance of "Motor1" or "Motor2".
They were from one of my projects 10 years or more ago.
LCD.start(TxPin, TxPin, %1000, 9_600)
WaitCnt(ClkFreq / 100 + Cnt) ' Pause to initialize
LCD.tx(12) ' Clear
LCD.tx(17) ' Turn on backlight
LCD.str(String("Motor1")) ' First line
LCD.tx(13) ' Line feed
LCD.str(String("Motor2")) ' Second line
LCD.tx(212) ' Set quarter note
LCD.tx(220) ' A tone
'WaitCnt(ClkFreq * 3 + Cnt) ' Wait 3 seconds
LCD.tx(18) ' Turn off backlight
..
AwesomeCronk, What do you think?
Or anyone else who would like to chime in.
Garyg
Posting from an iPhone, tomorrow, I will try to make the code read twice in a loop, then drop the loop frequency to 4Hz instead of 8Hz.