I still am not sure as to how to include a sketch inside another sketch
Basically, in one program I want to run an if statement that runs code X else code Y, but don't want to include a very large amount of code, instead just one line to call that program. I'm not exactly sure as to how to do this, and would greatly appreciate it. If you need more clarification, I would greatly appreciate it.
All of the code in your program must be loaded into program memory at compile time. Program code cannot be fetched from anywhere else after compilation.
Tbot1000:
Basically, in one program I want to run an if statement that runs code X else code Y, but don't want to include a very large amount of code, instead just one line to call that program.
hopefully you understand sub-functions (e.g. setup() and loop()). you can put all the code X code in one sub-function and the code Y code in a separate sub-function. your main code (in loop() can conditionally (using an if/else) call either the code X subfunction or the code Y subfunction.