Below is the complete circuit to feed the receiver audio into the Arduino for display. I am using three of the analog ports. One for the signal and two for pots to adjust the contrast of the signal on the display. Perhaps others will have better ideas of dealing with display adjustments and image processing. The cool thing is that Hellschreiber can be generated by a simple QRP CW transmitter and with the Arduino display and a simple direct conversion receiver, a portable Hellschrieber rig could be built. I am also thinking about a software based squelch that will pause the display when there is not a valid Hellschreiber signal present. This could be cool for beacons or short messages since the display holds over 2 minutes of receive output. You could then review transmissions that occurred hours ago.
Here is the code I am using currently. You will need to get the Seed 1.0 TFT library setup first and I suggest testing the display with the example code provided from Seed before trying my code. 73
// Seven Line Hellscriber Painter
#include <stdint.h>
#include <TFT.h>
int analogPin = 5; // The audio input pin
int analogPot1 = 4; // Lower Limit Pot pin
int analogPot2 = 3; // Upper Limit Pot pin
int x, y, x2; // plotting varables
int sig = 0; // Audio signal varable
int pot1, pot2; // Analog pot values
int greendot, dot; // The Hellscrieber dot varables
int lower, upper; // Contrast mapped pot values
void setup()
{
Tft.init(); //init TFT library
}
void loop()
{
// Each Line is 28 pixels high
for (int y=0; y<320; y++)
{
for (int x=215-x2; x<229-x2; x++)
{
sig=analogRead(analogPin); // signal input
pot1=analogRead(analogPot1); //get lower limit
pot2=analogRead(analogPot2); //get upper limit
lower=map(pot1,0,1023,0,511); // map pot1 to lower range
upper=map(pot2,0,1023,512,1023); // map pot2 to upper range
dot=map(sig,lower,upper,0,63); // Signal mapped into 5 bits with a lower & upper limit for contrast
greendot= dot << 5; // shift the dot value into the green range of the display RGB 565
Tft.setPixel(x, y, greendot); // plot green dot
Tft.setPixel(x+13 ,y ,greendot); // plot sample green dot again shifted by 14 pixels
delayMicroseconds(3480L); // master time delay for Hellschreiber
}
}
x2=x2+35; // paint line offset with boundary to seperate each line with black space
if(x2>210) x2=0; // if seventh line, start at the top again
}