Windows GUI

I have a remote control wired to an arduino so I can control my adjustable bed with my Microsoft surface. I am disabled so I can't use my hands for the remote. I have it working now, uploading different sketches to raise and lower the head and feet. Now I need to make a gui with nine toggle switches to turn the outputs from low to high. This is my first arduino project so I am looking for something easy to learn as my application is quite basic.

U could start with an arduino relay board

http://www.ebay.com/itm/8-Channel-5V-Relay-Shield-Module-Board-Optocoupler-module-for-Arduino-ARM-AVR-CN-/360717697832?hash=item53fc734328:g:p5QAAOxyoExSCJN6

and interface that to ur windows surface..

not sure how that would help, I just need a software application to control the output.

From your posts, I have no idea what is connected to what.

Perhaps you could take a photo.

If you want to write a program for the PC then that is kind of a matter for a different forum. There are lots of ways to make a GUI on a PC and for none of them does it matter that an arduino is involved. Python is probably the easier language but there are a few drag and drop style GUI editors if you are writing in Java.

BTW: you don't need separate sketches uploaded for each action. Write one sketch that takes input from the serial interface and build your GUI program to send commands over the serial interface to control it.

Delta_G: If you want to write a program for the PC then that is kind of a matter for a different forum. There are lots of ways to make a GUI on a PC and for none of them does it matter that an arduino is involved. Python is probably the easier language but there are a few drag and drop style GUI editors if you are writing in Java.

What do you do about the remote control that he says he uses?

What do you do about the Surface tablet that he says he uses?

Do you know how they fit in the whole scheme?

I thought the surface was the remote he wanted to create. If my answer isn't relate to then he can just ignore it. I think it is on the OP to write a good description of what they want. This was from my best guess given what the OP said.

here is my remote. I have the arduino wired to the buttons on the front panel. I can control different positions from my surface by uploading sketches like this.

void setup() {
  
  // initialize the digital pin as output:
  pinMode(2, OUTPUT);  // the number of the pin for head up
  pinMode(3, OUTPUT);  // the number of the pin for head down
  pinMode(5, OUTPUT);  // the number of the pin for feet up 
  pinMode(8, OUTPUT);  // the number of the pin for feet down 
  pinMode(9, OUTPUT);  // the number of the pin for both up
  pinMode(10, OUTPUT); // the number of the pin for both down 
  pinMode(11, OUTPUT); // the number of the pin for zero gravity 
  pinMode(12, OUTPUT); // the number of the pin for flat
  pinMode(13, OUTPUT); // the number of the pin for anti snore

  // write all pins low.
  digitalWrite(2, LOW);
  digitalWrite(3, LOW);
  digitalWrite(5, LOW);
  digitalWrite(8, LOW);
  digitalWrite(9, LOW);
  digitalWrite(10, LOW);
  digitalWrite(11, LOW);
  digitalWrite(12, LOW);
  digitalWrite(13, LOW);
}

void loop() {
  
  // put the head up, 
  digitalWrite(2, HIGH);
}

obviously it is not ideal to upload a sketch every time I want to move the bed. I want a gui that emulates the remote on screen so I can control it from my surface.

my question is whether there is a WYSIWYG type application for creating gui specifically for arduino. I have seen some diy projects for this but nothing widely used. I know I can use python, processing, etc but was wondering if there is anything more simple out there anyone recommends?

2016-02-03 (1).jpg

2016-02-03.jpg

Possibly the easiest GUI would be a control web page. Been a long time, but in the past I've used an apache web server on a pc that used batch files in the CGI folder to send serial/parallel port commands to attached gizmos. The web page had control buttons that sent commands to the apache server, which executed the batch files in the CGI folder. This might also be a good project for an ESP8266 web server attached to an arduino.

If you have a serial connection from your Surface (assumed from your ability to upload sketches) then adapting the sketch to act on serial input would be the first move.

So, Serial Input Basics would be a good place to start, then you could at least control the features from the Serial monitor of the IDE.

Writing a Surface GUI for basic serial control would not be an onerous task, but it is beyond the general scope of an Arduino forum. There is a forum for Interfacing with a computer or as a last resort, using the Gigs and Collaborations section.

Python itself would be easy to program. You could use Tkinter to implement the GUI part.

http://playground.arduino.cc/Interfacing/Python

You could use one of the bigger ESP8266 based modules like NodeMCU 3,05€ and no Arduino at all (If 3.3V could switch your bed).

More infos about that module http://nodemcu.com.

Martin-X: If you have a serial connection from your Surface (assumed from your ability to upload sketches) then adapting the sketch to act on serial input would be the first move.

So, Serial Input Basics would be a good place to start, then you could at least control the features from the Serial monitor of the IDE.

Writing a Surface GUI for basic serial control would not be an onerous task, but it is beyond the general scope of an Arduino forum. There is a forum for Interfacing with a computer or as a last resort, using the Gigs and Collaborations section.

thanks, I hadn't seen the serial monitor before, looks like a good start.

AllEyes:
I have a remote control wired to an arduino so I can control my adjustable bed with my Microsoft surface. I am disabled so I can’t use my hands for the remote. I have it working now, uploading different sketches to raise and lower the head and feet. Now I need to make a gui with nine toggle switches to turn the outputs from low to high. This is my first arduino project so I am looking for something easy to learn as my application is quite basic.

Obviously you already can command your bed by letting the Arduino press the buttons of your remote control. Question then is, how to let the Arduino know which button to press, how long?

Some general questions:

Does your bed react immediately on the remote control, without intervention of a PC or other device?
(So we don’t give inappropriate advice)

If you are disabled, what’s your preferred way to control your bed etc.?
Are you using voice control already, or how do you enter sketches?

Is a PC (tablet?) always available, when you want to adjust your bed?
Or would it be better to add other means to make the Arduino press buttons immediately?

Hi, How is the Arduino connected to the surface, if it is serial, then you could try an open program called Processing on your Surface. If Processing will run on your Surface you can make a GUI that can communicate with the Arduino.

http://processing.org

If you google arduino processing there are lots of examples.

Hope it helps.. Tom.... :)

DrDiettrich:
Obviously you already can command your bed by letting the Arduino press the buttons of your remote control. Question then is, how to let the Arduino know which button to press, how long?

Some general questions:

Does your bed react immediately on the remote control, without intervention of a PC or other device?
(So we don’t give inappropriate advice)

If you are disabled, what’s your preferred way to control your bed etc.?
Are you using voice control already, or how do you enter sketches?

Is a PC (tablet?) always available, when you want to adjust your bed?
Or would it be better to add other means to make the Arduino press buttons immediately?

I generally do 6 seconds at a time until it is in the right position. It does act immediately. I can’t speak either, I use eyegaze. I can control my computer using my eyes.

Did you have any success in the meantime?

I've just played around with Processing, it should allow to create a useful Windows GUI - provided that you can control the mouse and click a button in that GUI.

AllEyes: not sure how that would help, I just need a software application to control the output.

You want to have a Windows GUI application to control the outputs of your Arduino? Is it that?

So what do you think about sending short 1-letter-commands or 2-digit-commands with the "serial monitor" of the Arduino-IDE (or a different "serial terminal software", there are some which do not require the Arduino-IDE).

Perhaps "serial control" with commands like that: 15 (switch output channel 1 for 5 seconds on pressing "send" in the serial monitor) 23 (switch output channel 2 for 3 seconds on pressing "send" in the serial monitor) 39 (switch output channel 3 for 9 seconds on pressing "send" in the serial monitor) you could also have a default time for each channel, so you could have single-digit commands: 6 (switch output channel 6 for default time on pressing "send" in the serial monitor)

Something like that perhaps, using the "serial monitor"?

The OP uses a special software that converts his eye movements into cursor movements and clicks. That's why a GUI application is required, that can react on the simulated mouse movements and clicks.