Hi
With reference to the above library, could someone list the various commands available for creating various waveforms
Thank you
Hi
With reference to the above library, could someone list the various commands available for creating various waveforms
Thank you
Welcome to the forum
As your topic does not relate directly to the installation or operation of the IDE it has been moved to a more relevant category of the forum
As to your question, you can see the functions available if you look at the .h file of the library. The library will also probably come with examples
From the .h file these would appear to be the 3 waveforms available
void sine(float freq_hz);
void square(float freq_hz);
void saw(float freq_hz);
Thank you for the list of three waveforms
Please explain how I can 'look' at this library.....this is why I posted the question in the first place......I do not know how to 'look' at the library
The library is in this path on my Windows PC
C:\Users\Bob2\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.2.0\libraries
Substitute your Username for mine and change the board release number if you have a different one than me
Many thanks
One last question relating to this library..................
I am looking through the analogWave.cpp file
and I note the following:-
for each of the three waveforms we have code sections such as..............
static constexpr std::array..................
and
static const std::array
so my question:
Given this grouping of code for the three waveforms, would it be possible to add in a fourth waveform (e.g. triangle) code grouping - provided one knew what one was doing ?
i.e. to enhance the library to handle four waveforms rather than three
Yes, you can add functionality to the library as long as you know what you are doing. However, be aware that if you do that, then should the library be updated your additions will be lost
You might be better off copying the library code to a different name and making changes to that
Thank you very much.........
Bob