Testing Analog Input

Can I attach a potentiometer as shown in the picture below to test my analog input code?

Pot.jpg
My expectation is that as I vary the pot, the values read from pin A will change accordingly. The code is a simple (FreeBASIC; [size=85]thanks zoomkat[/size]) program that loops, issues the command to read the analog value from pin A (VA ) and prints the raw result to the screen.

[code]Dim As String qs, dat
Dim As Integer i, maxiter, level

qs = “VA” + Chr(13)
maxiter = 100
Print "# of loops: ";
Input maxiter

For i=1 to maxiter
Open Com “COM4: 115200,N,8,1,BIN,CD,CS,DS,RS” For Binary As #1
Put #1, qs
Sleep 20
dat = Input$(Loc(1), #1)
Close #1
If dat = “” Then
Print “Nothing came back :(”
Else
Print "Returned value ";asc(dat)
End If
next i

fini:
End
[/code]
Thanks,
dj

Yes assuming v+ is 5vdc and V- is ground. Sure!

Thanks ! I didn’t want to burn up my SSC-32 :laughing:

And so we don’t have to assume, I have modified a servo cable to connect the pot ([size=85]and my circuit[/size]) to the SSC-32 in this manner.

pot-conn.jpg