Anyway, you get two pieces of program one called " FunctionGenerator.ino " and another " waveform.h "
I copied the two, one behind the other in the same sketch , compile and I obtain the following errors:
sketch_dec12a.ino:12:23: error: Waveforms.h: No such file or directory
sketch_dec12a.ino: In function 'void setup()':
sketch_dec12a:23: error: 'analogWriteResolution' was not declared in this scope
sketch_dec12a:24: error: 'analogReadResolution' was not declared in this scope
sketch_dec12a.ino: In function 'void loop()':
sketch_dec12a:34: error: 'maxSamplesNum' was not declared in this scope
sketch_dec12a:35: error: 't_sample' was not declared in this scope
sketch_dec12a:37: error: 'DAC0' was not declared in this scope
sketch_dec12a:37: error: 'waveformsTable' was not declared in this scope
sketch_dec12a:38: error: 'DAC1' was not declared in this scope
I know the first error has to do with the library. But I dk exactly how to fix it .
And the others with not declaring the elements, but i dk...
Duplicate posts deleted (in 2 languages).
Please do not cross post.
If a good answer does come up in the other language, please share it here, and the same the other way.
I copied the two, one behind the other in the same sketch
That's the wrong way to do it and is why the first error message is "Waveforms.h: No such file or directory".
Waveforms.h must be a separate file in the same directory as FunctionGenerator.ino
CrossRoads:
Duplicate posts deleted (in 2 languages).
Please do not cross post.
If a good answer does come up in the other language, please share it here, and the same the other way.
I copied the two, one behind the other in the same sketch
That's the wrong way to do it and is why the first error message is "Waveforms.h: No such file or directory".
Waveforms.h must be a separate file in the same directory as FunctionGenerator.ino
Pete
I create a folder in my desktop called "Waveform_Generator".
I create a sketch and paste the first file and I save as... "WaveformGenerator.ino" in the "Waveform_Generator" folder.
I create a sketch and paste the second file and I save as.. "Waveforms.h" in the "Waveform_Generator" folder.
If you are using Windows, the usual place for the directories is "My Documents\Arduino".
The name of the directory must be exactly the same as the .ino file (without the .ino) so you should make a directory called "My Documents\Arduino\WaveformGenerator" and put the two files in there. That will make it easier to find when you start up the Arduino IDE. You should be able to open the File|Sketchbook menu and find WaveformGenerator listed in the dropdown menu.
el_supremo:
If you are using Windows, the usual place for the directories is "My Documents\Arduino".
The name of the directory must be exactly the same as the .ino file (without the .ino) so you should make a directory called "My Documents\Arduino\WaveformGenerator" and put the two files in there. That will make it easier to find when you start up the Arduino IDE. You should be able to open the File|Sketchbook menu and find WaveformGenerator listed in the dropdown menu.
Pete
I think I have done as you told me.
Now I see two tabs
Only one error message:
"WaveformGenerator.ino: 12: fatal error: Waveforms.h: No such file or directory
compilation terminated."
Waveforms is the name of the next tab. No because it does not find.
Use Windows Explorer to look at the "My Documents\Arduino\WaveformGenerator" directory. It should have two files in it, WaveformGenerator.ino and Waveforms.h
Either Waveforms.h is missing or the filename isn't spelled correctly. If you change the name of the file, or add new files to a directory, you have to close the Arduino IDE and start it up again before it will see any changes.
Note the Tutorial page hasn't been proofread, and calls the the second file
"Waveform.h" - this won't work, the filename must match exactly. Case is always
sensitive in C.
Hi,
I have actually also a problem with this example, but progressed a bit with the errors,
I see the two tabs while opening and named all ase sensitive, but receive the following errors,
FunctionGenerator.ino: In function 'void setup()':
FunctionGenerator:24: error: 'analogWriteResolution' was not declared in this scope
FunctionGenerator:25: error: 'analogReadResolution' was not declared in this scope
FunctionGenerator.ino: In function 'void loop()':
FunctionGenerator:36: error: 't_sample' was not declared in this scope
FunctionGenerator:38: error: 'DAC0' was not declared in this scope
FunctionGenerator:39: error: 'DAC1' was not declared in this scope
//
Any ideas?
When commenting(//) line 2) the Poti works accordingly
When uncommenting line 2) the Poti does not initiate a frequency change at all.
I a monitoring only DAC0
Hi,
I'm also new in Arduino platform but I had similar issues as you did Yariv3G. The final issue I had before I succesfully upload the code was the error: No COM1 communication. To solve it, i click Tools>Port:...>/dev/cu.usbmodem1421.
In other words, both Board and Port needed to be selected manually.
Thanks for the Q&A, I found it very useful.