Switch Arduino program on the fly?

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
dnorm
 
Posts: 7
Joined: Wed Jun 13, 2018 9:01 am

Switch Arduino program on the fly?

Post by dnorm »

Is it possible to change what an Arduino is running without reprogramming it? So if I wanted to change which monitor my Adalight was grabbing?

My thought is that I could stream my Xbox to my PC monitor (I use my PC as a media center/gaming/machine) and have Adalight, which would normally grab my TV, switch and grab the stream on the other monitor instead and thus work with my Xbone.

I think that makes sense.

User avatar
dnorm
 
Posts: 7
Joined: Wed Jun 13, 2018 9:01 am

Re: Switch Arduino program on the fly?

Post by dnorm »

Or maybe I am overthinking things. Could I just have the Arduino change a variable, or read a variable from my PC over the USB?

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: Switch Arduino program on the fly?

Post by adafruit_support_bill »

You would need to combine the two programs into one - with a conditional statement such as an 'if' to switch between them.

You could connect a switch to one of the GPIO pins. Or you could send a command via the USB Serial connection to your PC and use that as the condition of your 'if' statement.

User avatar
dnorm
 
Posts: 7
Joined: Wed Jun 13, 2018 9:01 am

Re: Switch Arduino program on the fly?

Post by dnorm »

adafruit_support_bill wrote:You would need to combine the two programs into one - with a conditional statement such as an 'if' to switch between them.

You could connect a switch to one of the GPIO pins. Or you could send a command via the USB Serial connection to your PC and use that as the condition of your 'if' statement.
Okay thanks!

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”