Search code examples
arduinoarduino-c++

is it possible to upload several sketches to an Arduino board


I have a project that is divided into two sections each one of them requires an independent sketch, I wanna upload the two sketches into the same Arduino card without one of them ruining the other's work, is that possible? if yes how to please if no any other alternatives


Solution

  • No.

    But you could combine both rather independent parts and add some logic to find out which part should be active, currently.

    E.g. When a button (-combination) is pressed at restart, Arduino runs the test mode, else it runs in standard mode.

    You can have multiple tabs in the Arduino IDE to handle the modes more independently, but all code is coexisting in flash memory after upload.