Oops......I was programming last night and when I set up all of my #define's I did have an "=" in there. Works now and I need to work on my attention to detail
jerseyguy1996:
Oops......I was programming last night and when I set up all of my #define's I did have an "=" in there. Works now and I need to work on my attention to detail
Better yet, change your programming style:
const int outOne = 10;
const int on = 11;
This gives the compiler more information and lets it do more syntax checking for you.
jerseyguy1996:
Oops......I was programming last night and when I set up all of my #define's I did have an "=" in there. Works now and I need to work on my attention to detail
Better yet, change your programming style:
const int outOne = 10;
const int on = 11;
This gives the compiler more information and lets it do more syntax checking for you.
Thanks! I will remember that and use it in my sketch. I mainly just need to be able to keep the commands straight across multiple sketches because the commands will be sent from one arduino over bluetooth to be received by another arduino. I was having trouble keeping things straight across my different sketches.
jerseyguy1996:
I mainly just need to be able to keep the commands straight across multiple sketches because the commands will be sent from one arduino over bluetooth to be received by another arduino. I was having trouble keeping things straight across my different sketches.
One thing you can do it encapsulate the parts that are common to both sketches into a library. You can call it something like "MyProtocol". You would put MyProtocol.h into a MyProtocol directory inside a 'libraries' directory in your sketch folder. Then you can #include "MyProtocol" in both sketches and anything you define in the .h file will be common to both.
If there are functions or objects common to both you can put them in MyProtocol.cpp in the same MyProtocol directory.