Touch Screen Relay Controller

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!

Moderator: phalanx

Touch Screen Relay Controller

Postby Blenderite » Sun Sep 10, 2017 6:36 am

Hello all!

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!
Blenderite
 
Posts: 9
Joined: Thu Dec 31, 2015 7:58 pm

Re: Touch Screen Relay Controller

Postby Anthony Fremont » Sun Sep 10, 2017 7:27 am

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.

Sent from my Moto G (4) using Tapatalk
Anthony Fremont
 
Posts: 23
Joined: Fri Oct 12, 2007 6:25 am

Re: Touch Screen Relay Controller

Postby markaren1 » Sat Sep 16, 2017 8:53 pm

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
markaren1
 
Posts: 386
Joined: Sat Dec 19, 2009 12:16 pm

Re: Touch Screen Relay Controller

Postby lyndon » Sun Sep 17, 2017 5:33 pm

I did something like this but I used a Raspberry pi since it was simpler. Maybe I should put details on my blog?
lyndon
Support Volunteer
 
Posts: 1515
Joined: Thu Jul 17, 2008 6:37 pm
Location: Minnesota, USA


Return to Projects

Who is online

Users browsing this forum: No registered users and 4 guests