Here's version k9, and some instructions
I now have the the RPi camera working but you can still use a usb camera, eg Logitech c270 on usb.
I would recommend using the usb and the Arduino Uno interface, not GPIO if using a usb webcam.
I have it working with a NEQ6pro (ST-4) and a Meade LX10, just needs different wiring to the relay interface
Note to EXIT the program always use the RED BUTTON not just close the window.
If you do close the window you'll need to reboot the RPi.
Installing Autoguider 90*
Works with a Raspberry Pi (http://www.raspberrypi.org
) with 'Wheezy' using the RPi GPIO outputs (you'll need supply the relay interface) or driving my Arduino Uno interface with USB.
Use the latest RPi Raspian wheezy download.
sudo apt-get update
sudo apt-get upgrade
to get the latest upgrades.
Uses IDLE/Python 2.7 . You must start IDLE by using 'startx' to start the GUI, then choose 'LXterminal' and enter 'sudo idle' at the prompt, if not the GPIO won't work
Requires a powered USB hub for the Raspberry Pi to allow connection of keyboard, mouse, suitable webcam and Arduino Uno interface if you dont use the RPI camera.
Unzip and copy the gt90**.py file into /home/pi,
(Note if using an old version the config*.txt files are not compatible, just delete old ones, and use the SAVE configs option to re-write them)
if you are connected to the internet:
type sudo apt-get install python-serial
you may also need fswebcam
type sudo apt-get install fswebcam
In using a PAL composite monitor (as opposed to HDMI) you will need to modfy config.txt on your RPi
remove the # from the following line:
and to centre the image you may need to remove the #'s from the following lines , and possible change the values:
Running Autoguider 90*
from the prompt type startx
double click LXTerminal
enter 'sudo idle' at the prompt, and press enter
On the Python Shell choose 'File'
click on Open
Choose 'Run Module'
The RPI camera will be enabled (assumed you've installed one and have it enabled and working)
To enable a usb webcam instead change the line in the gt90***.py program to
use_RPiwebcam = 0
If the camera is not connected and you enable it the program will stop with an error.
The GPIO will be enabled unless you change the line in the gt90***.py program to
use_RPiGPIO = 0
The GPIOs used are pins 22 = N, 18 = S, 24 = E, 16 =W
You will need to provide the relay interface to the scope, I can provide some details.
If you want to enable the serial comms to the Arduion Uno interface change the line in the gt90***.py program to
serial_connected = 1
If it's not connected and you enable serial comms the program will stop with an error.
(note Arduion Uno connects as /dev/ttyACM0)
Below the picture you will see the buttons to control the program:
Autoguide - switches autoguide mode on / off
A-Win - Automatically adjusts the size of the tracking window to star size
A-Thr - Automatically adjusts the Threshold level
Log - will log any commands sent to the scope (in /tmp/yymmddhhmmss.txt)
NR - switches on/off noise reduction (averages over 2 frames)
Graph - will show a graph of the stars brightness, showing the max and min values and the threshold set.
(clicking the mouse between these max and min (blue lines) levels will also set the threshold value, assuming you don't have A-Thr on)
Plot - will show a plot of the movement commands required to the Scope.
Thres - will show the detected area of the star, adjusting threshold or enabling A-Thr will change this.
NSi/EWi - inverts the required commands, use if the controls are inverted and guiding moves star away from the target rather than to it.
rgbw +/- selects guide camera channel red/green/blue/white
window +/- sets the size of the window, inc / dec in 32 pixels
Threshold +/- sets the detected level (switch ON Thres to see on display)
interval +/- sets the time (seconds) between commands sent to the scope
(note at times this may automatically increase as required)
Zoom - will switch to 640x480 / 800x600 / 960x720 from the camera, and crop it to 352x288 giving some magnification. This is faster than trying to display a full image.
scale N/S/E/W - sets the required movements of the scope in mSeconds/pixel.
Default set (160) for a 80mm,� FL = 400mm guide scope
scale all - will increment / decrement all scales together
Telescope N,E,S,W will move the scope (1 second pulses)
s in centre is stop - will cancel any existing move command
Window N,E,S,W will move the window in small steps
c in centre will centre target window on centre of the screen.
SAVE config 1/2/3 will save configs to file
RELOAD config 1/2/3 will reload saved configs
sc - will capture a screenshot,
pc - will capture a full resolution picture from the RPi camera (not usb)
note these will be overwritten next time the program runs so move them if you need to keep them
You will also see controls for the RPI camera if you are using that.