Tracking System
The Tracking System With HD Video(TSwHDV) is one of the very first
projects I have worked on. I had started working on it in 5th grade
alongside my father. He had made a majority of the mechanical parts
whereas I had worked on the programming aspects of it. This was also
my first practical project using the Raspberry Pi and Linux, which
became a big part of a lot of the other projects I have worked on
later on.
As for the project itself, it consists of 2 Raspberry Pi's. One of
them has an antenna and is stationary, this one being the Receiver
(Rx) end. The other Pi, the Transmitter (Tx) is mobile and transmits
information to the receiver. The Rx Pi rotates using a motor to face
towards the Tx Pi based on it's location information. The
transmitter also can send video via a pipe with the push of a
button.
The basic flow of the program is as follows: First the Tx Pi turns
on, and checks for GPS fix. Once fix is achieved, it connects to the
Rx Pi with Paramiko, a module for the ssh protocol. After
connecting, the Rx Pi turns on an LED on it, indicating that fix has
been achieved on the transmitter. It then starts it's own GPS fix
checker. Once both GPS's are fixed, we proceed to the main program.
The main program waits for one of 2 buttons on the Rx to be pressed.
When the video button is pressed, it runs the video function. This
function opens the Rx Pi to incoming video, then, again with
Paramiko, connects to the other Pi and starts transmitting video.
Pressing it again turns off the video by getting the netcat PID and
killing it. When you press the Tracking button, it allows the servos
to rotate to face towards the Transmitter. On the other hand, the Rx
on startup runs a program called "pishutdown.py" This program
listens to a seperate button, which when pressed for less than 5
seconds reboots both systems, and when pressed for more than 5
seconds shuts both sides down. Again of course, using Paramiko to
ssh to the Transmitter.
The following is a flowchart of the aforementioned process. Being
written nearly 6 years ago when I was in fifth grade, it is not the
best however it will give the general gist of how the system works.