Error in http://arduino.cc/en/Hacking/LibraryTutorial
the ratio of dot length dash length in morse code 1:3, not 1:4 in tutorial. (see book on morse code, or wikipedia.), interletter spacing 3 dot lengths (750 ms in example) , interword space 7 dot lengths.
sos "prosign" (see wikipedia article) letter spaces not needed might better have correct interword delay (1750 ms in example, of 250 ms trailing space of dot/dash).
the code change trivial. presently code is:-
for simple change should be:-
i should correct this, not know how make corrections, nor how contact original author ask permission. advice anyone?
regards - james bryant
sos "prosign" (see wikipedia article) letter spaces not needed might better have correct interword delay (1750 ms in example, of 250 ms trailing space of dot/dash).
the code change trivial. presently code is:-
code: [select]
int pin = 13;
void setup()
{
pinmode(pin, output);
}
void loop()
{
dot(); dot(); dot();
dash(); dash(); dash();
dot(); dot(); dot();
delay(3000);
}
void dot()
{
digitalwrite(pin, high);
delay(250);
digitalwrite(pin, low);
delay(250);
}
void dash()
{
digitalwrite(pin, high);
delay(1000);
digitalwrite(pin, low);
delay(250);
}
for simple change should be:-
code: [select]
int pin = 13;
void setup()
{
pinmode(pin, output);
}
void loop()
{
dot(); dot(); dot();
dash(); dash(); dash();
dot(); dot(); dot();
delay([color=red]1500[/color]);
}
void dot()
{
digitalwrite(pin, high);
delay(250);
digitalwrite(pin, low);
delay(250);
}
void dash()
{
digitalwrite(pin, high);
delay([color=red]750[/color]);
digitalwrite(pin, low);
delay(250);
}
i should correct this, not know how make corrections, nor how contact original author ask permission. advice anyone?
regards - james bryant
don't hold breath
also wouldn't wonderful if rid of calls delay().
...r
also wouldn't wonderful if rid of calls delay().
...r
Arduino Forum > Community > Website and Forum > Error in http://arduino.cc/en/Hacking/LibraryTutorial
arduino
Comments
Post a Comment