3 months ago
Chief Petty Officer 2nd Class)
Firstly I can't recommend G6SWJ tutorial on Arduino highly enough. It is a great step by step introduction to a huge world of fun. Well Done sir!
Secondly in response to a point about Morse in Arduino, I wonder if there's a half way house for members who don't feel inclined, or maybe even terrified, about learning a whole new approach, i.e. Arduino IDE interface.
So, at the risk of being 'shouted at', can I offer a simple Morse program, in Arduino, written as an Instructable by Chris Weatherford - to whom credit must be duly given. (There's a link below).
I have no connection to either Mr Weatherford or Instructables, but it's a great intro if you understand a few very limited points.
1/ Make sure your required Morse signal in placed in between the quotation marks in the line containing
char stringToMorseCode = "Arduino Morse Code Project";
2/ you do not need to put a loudspeaker in the 'loop' just put another led instead - it won't do anything, just sit there!
3/ Experiment with the contents of the line-
// At the end of the string long pause before looping and starting again
You will quickly see that altering the value LightsOff(8000); to something like 1000, or even 100000, will give you an idea of what 'time' really means in a program. Once you have an idea of how long something really lasts for you can even mess around with the values in the group of lines starting -
int dotLen = 100; // length of the morse code 'dot'
int dashLen = dotLen * 3; // length of the morse code 'dash'
int elemPause = dotLen; // length of the pause between elements of a character
int Spaces = dotLen * 3; // length of the spaces between characters
int wordPause = dotLen * 7; // length of the pause between words -
You'll see that changing 'dotLen * 14' can really affect the length of pause between words!
Incidentally, if your Morse signal will never include some letter of the alphabet, then delete those blocks of line from your copy 'ino'.
4/ Check your connections on the breadboard, check your typing and most of all when you copy and paste the Instructable code into the Arduino IDE, save it, and then save again with a new name (something like anomorse.ino) so that the original always exists, if fat fingers or confusion overtake you.
I really hope you all follow G6SJW's great concept, but perhaps if you wish to dive in and get a result for the cost of an Arduino Uno clone, from Ebay UK for a couple of pounds (I even saw one on Amazon UK today for £6.95) some leds and resistors, with a sprinkling of luck, you'll have your model signalling in no time.