I copied this program and am having trouble with the void downFrequency function (I think). This is for Arduino Uno. Here are the compiler errors: Compiling \'MY_dds\' for
Simple copy always mess up the source code.
One can check the "stray" problem via cat -A yoursrc.c
To me, I usually reformat the code by vim in two steps.
vim yoursrc.c
:%!tr -cd '[:print:]\n'
Then compile gcc yoursrc.c
You've somehow ended up with "en dash" characters, rather than normal minus signs, in the downFrequency
function.
Make sure you're editing using a text editor, not a word processor; and for each of these:
toFrequency = (toFrequency – 1);
^
delete the marked character, and retype as a normal minus sign.
(If you're interested in the gory details, the "dash" character is Unicode 2013, encoded in UTF-8 as three bytes with octal values 324,200,223, which is why you see those numbers in the error messages.)
The compiler is complaining that there are non-ASCII characters in your source file.
My octal fu is rusty, but it looks like UTF-8 to me. 342 200 223
is E2 80 93
which is Unicode "EN DASH." This code was given a minus sign makeover by a text editor with a degree in cosmetolegy.
Probably your double quote symbols (") were wrong. Please check if they are actually "
, and not ”
.