Install the OS of your choice on the Pi, we used Raspbian since people familiar with Debian/Ubuntu find it easy to use. This step will follow Raspbian conventions; you can use any distribution if you'd like but then you'll have to adjust these to the flavor it uses.

Taking images is going to happen using raspistill, this should already be installed on the device. Conversion to SSTV modulated sound file will happen using PySSTV and UNIXSSTV, so you'll need Python, Git, GCC and make for that. Latter dependencies are present by default on Raspbian, so you just need to install the two SSTV software by executing the following commands.

sudo pip install PySSTV git clone <a href="https://github.com/dnet/unixsstv" rel="nofollow">https://github.com/dnet/unixsstv</a> make -C unixsstv

The image will be taken and preprocessed in Python, an example script can be found below:

from PIL import Image from pysstv.color import MartinM2 from subprocess import check_output from cStringIO import StringIO import RPi.GPIO as GPIO import struct, sys TX_PIN = 18 img = Image.open(StringIO(check_output(['raspistill', '--output', '-', '--width', '320', '--height', '256', '-e', 'bmp']))) overlay = Image.open('overlay.png') img.paste(overlay, (0, 0), overlay) img = img.resize((MartinM2.WIDTH, MartinM2.HEIGHT)) sstv = MartinM2(img, 44100, 16) for freq, msec in sstv.gen_freq_bits(): sys.stdout.write(struct.pack('ff', freq, msec)) GPIO.setmode(GPIO.BCM) GPIO.setup(TX_PIN, GPIO.OUT) GPIO.output(TX_PIN, True)

The image in overlay.png will be put onto the photo, so you'll need to construct it in a way that most of it is transparent, since those pixels will be the only ones that can be seen from the photo. Feel free to experiment, just make sure that if you use ham (amateur) radio frequencies, transmit your callsign by putting it on the image. (Advanced users can try and use the FSK callsign encoder in PySSTV.)

Martin M2 was selected since it has a rather nice color output, while still taking only one minute to transmit an image. 44100 Hz and 16 bits are also good default parameters, but feel free to experiment with those as well, just make sure to match these parameters in other components.

Since this script ends its job by activating the PTT and writing preprocessed SSTV data on the standard output (stdout), another component is needed that finishes the processing, plays the sound on the audio output, and deactivates PTT at the end.

For this, a shell script needs to be created like the one below:

#!/bin/sh python /home/pi/beacon.py | /home/pi/unixsstv/gen_values 44100 >/tmp/wav.bin play -q -r 44100 -t f32 -c 1 --norm /tmp/wav.bin >/dev/null 2>&1 python -c 'import RPi.GPIO as G; G.setmode(G.BCM); G.setup(18, G.OUT); G.output(18, False); G.cleanup()' >/dev/null 2>&1 rm -f /tmp/wav.bin

The Python script above is named beacon.py and located in the home directory of the default pi user, if this differs on your device, you'll need to change this appropriately. The output is piped into gen_values of UNIXSSTV, and then saved to a file with no header, just binary contents, hence the .bin extension.

This is later played with the play command of sox, which can be installed on Raspbian from the package sox, but you might have to do that manually on other distros. Finally, the PTT is deactivated by calling Python code directly, in so-called inline style, and rm deletes the temporary preprocessed file.

Note: since GPIO can only be manipulated by root, you'll need to execute this shell script as root as well. Also, play will use the HDMI audio channel by default, so make sure to disconnect HDMI while trying this part. If no sound plays, also check the volume level (for example with alsamixer).

Having these, capturing the image and transmitting the photo can be tried by executing the above shell script from a console (serial, local, GUI) or over SSH. If it works well, just one thing is needed for regular transmission called cron. On Unix-like systems such as Linux, this program performs predefined tasks according to a schedule that can be set using crontab -e, where -e stands for edit. This will display the current schedule of the user (this should be root for this task) and allows editing it in the user's default editor. There's also some help in there regarding the syntax, and for example, sending an image every 15 minutes looks like this:

*/15 * * * * sh /home/pi/beacon.sh

This setup can be tested by connecting the Raspberry Pi to a USB charger, and if everything works, you can continue by replacing it with solar.