Hello,
I need some help combining some sketches. I did some googling and had a few goes at combining them without success. I've attached the codes below.
Hi,
Can you tell us what each code does and if it compiles and works.
What model arduino are you programming.
Are you using any shields?
What do you want to final combined sketch to do?
TomGeorge:
Hi,
Can you tell us what each code does and if it compiles and works.
What model arduino are you programming.
Are you using any shields?
What do you want to final combined sketch to do?
Tom.....
Ok
The TVB code is the code for a TV-B-Gone, which turns on almost any TV. It uses the main.h and WORLDcodes.cpp
Fade is just the fade in examples, it increases the brightness of an led slowly and then decreases the brightness at the same rate.
The toneMelody is a modified version of the example and just plays a constant buzzing through a speaker.
All of the codes verify and work and I'm using an Arduino Pro Mini without any shields.
I want the final code to Fade a LED and play the sound From the toneMelody sketch and run the TV-B-Gone code when the board powers on
It was intended for a pair of .ino files and not the structure you have. However the idea of putting the code into functions should still be appropriate. Then just include all the .cpp and .h files
After that you will need to go through the code to check, for example, if two things are using the same pin for different purposes.