I have a little bit of an unusual need. I want to make a touch screen widget that will control relays on my truck.
I will need it to: accept and monitor for changes on multiple inputs at the same time, have a touch screen button interface, have the ability to reprogram the screen to change the button layout without removing the module from the vehicle, be able to control multiple (probably no more than 12) relays and potentially at the same time.
Correct me if I am wrong, but isn’t Arduino a single thread processor? It can only monitor a single input at a time? What would be the best board to control this?
If you guys could give me a little guidance, I would appreciate it. Thanks!
Yes, I guess you could say it’s single thread, but you can use interrupts to detect changes on input pins. You can also use a timer interrupt to poll or scan for things and then process them at main level. I don’t know the specifics of your touch screen, but I’m guessing it can generate an interrupt somehow, or you could poll it several times per second. It sounds to me like the Arduino is plenty capable of doing the job, you just have to be a little creative with your code. You might want to post your question to the Arduino forum. Lots of activity over there.
You can easily monitor multiple inputs and control multiple outputs from a single-threaded CPU. From you requirements, how about using a smart-phone connected (by WiFi) to an ESP-8266 which is the web-server, and is also doing the heavy(!) lifting. Have a look at micro-python for that target. -Mark