River City ARCS �General Membership Meeting
March 4, 2014
Learning Computer of the 80’s
$99 Sinclair ZX81 Kit
Typical ZX81 Set Up
Today’s $29 Learning Computer
What is a Microcontroller?
http://www.freescale.com/files/microcontrollers/doc/ref_manual/M68HC05TB.pdf
ANALOG�INPUTS
What is the difference between a ‘Digital Input’ and an ‘Analog Input’?
Terminology
Shields
APRS Shield
Ethernet Shield
Touchscreen Shield
Sensors
Photo/thermistor, infared, force sensitive resistor, Hall effect, Piezo, tilt sensor..
Sketches
Includes
Globals
void setup()
void loop()
Applications - APRS
Argent Data
Trackduino
Arduino Controlled Tuner
Morse Encoder
http://www.multiwingspan.co.uk/
Morse Encoder Flow Chart
Morse Encoder - Sketch
/* � Piezo Element Morse Code Sketch� � */��const int buzzerPin = 9;�const int ledPin = 7; CHANGE to pin 13 (on board LED)�// tone frequency C�const int tonefreq = 523; CHANGE to 2500 (louder piezo output)� �// constants for tone and rest durations�const int dotlength = 100;�const int dashlength = dotlength * 3;�// inter-element gap - between each dot or dash of a letter�const int inter = dotlength; �// letter gap is 3 dots - the inter gap is always added - so this is one fewer�const int lgap = dotlength * 2; // inter-letter gap�// word gap is 7 dots - with letter and inter gap already counted, this is -1�const int wgap = dotlength * 4; //inter-word gap�…
Sketch – Character Routines
void dot()�{� // play a dot� tone(buzzerPin, tonefreq);� // LED� digitalWrite(ledPin, HIGH);� delay(dotlength);� noTone(buzzerPin);� // LED� digitalWrite(ledPin, LOW);� delay(inter);�}��void dash()�{� // play a dash� tone(buzzerPin, tonefreq);� // LED� digitalWrite(ledPin, HIGH);� delay(dashlength);� noTone(buzzerPin);� // LED� digitalWrite(ledPin, LOW);� delay(inter);�}
Morse Character Table
void soundLetter(char letter)�{� // letters are in order of frequency� switch(letter)� {� case 'E':� dot();� return; � case 'T':� dash();� return; � case 'A':� dot();� dash();� return;� case 'O':� dash();� dash();� dash();� return; � case 'I':� dot();� dot();� return;
…
RTTY Encoder
http://www.timzaman.com/?p=138
RTTY Encoder Flow Chart
RTTY Sketch - Changes
// Transmit a bit as a mark or space
void rtty_txbit (int bit) {
if (bit) {
// High - mark
digitalWrite(2, HIGH); CHANGE TO tone(buzzerPin, markfreq); (2295)
digitalWrite(3, LOW); CHANGE TO digitalWrite(ledPin, HIGH);
}
else {
// Low - space
digitalWrite(3, HIGH); CHANGE TO tone(buzzerPin, spacefreq); (2125)
digitalWrite(2, LOW); CHANGE TO digitalWrite(ledPin, LOW);
}
// Delay appropriately - tuned to 50 baud.
delay(20); CHANGE TO delay(22.222); (45 baud)
//delayMicroseconds(250);
}
Questions?