Go Down

Topic: Program a GUI in C/C++ for arduino and mouse cursor control (Read 15400 times) previous topic - next topic

karlok

sorry i cannot help you with that
there is much information on the internet about it

Good Luck!
using Arduino Uno Rev 3

Shploop

my question is how to create a GUI that will work with Arduino not how to make a GUI I need only directions not a whole guide. for example I found I can make a GUI for Arduino with Qt(by nokia) I need a GUI that will interact with an Arduino, just the "method" all the coding and headache i'll handle.

PaulS

Quote
I need a GUI that will interact with an Arduino, just the "method" all the coding and headache i'll handle.

The only way for the GUI to communicate with the Arduino is via the serial port. Some languages make that easy. Some do not.

Shploop

what about threading? when I have a GUI let's say in C++ and a user is interacting with it while it receives and processes data from the Arduino do I need some kind of threading?

karlok

I don't use threads in my applications that communicate with my Arduino. However, it would be an optimization and an option to do so, my programs work very well and I can rely on them without using threads.
using Arduino Uno Rev 3

Carsten53T


what about threading? when I have a GUI let's say in C++ and a user is interacting with it while it receives and processes data from the Arduino do I need some kind of threading?

It would probably be more cumbersome than building your application like a loop. The serial events seems to at least have some asynchronicity about it (in/outgoing data stays in buffer until read/written). In the loop you can poll sequentially if something happened on the mouse or in the serial ..

Shploop

what if the data from the arduino can be stored in some data block(or variable) and the C gui will pull it out in a loop(even after it was already sent), this will eliminate the need to synchronize them(they'll need minimal synchronization just to tell if data is transferred or not at a given moment).

Carsten53T

#22
Aug 04, 2012, 07:19 am Last Edit: Aug 04, 2012, 07:24 am by Carsten53T Reason: 1
Shploop,
I googled "serial and c++" and got these links

http://www.codeproject.com/Articles/992/Serial-library-for-C
http://www.codeguru.com/cpp/i-n/network/serialcommunications/article.php/c2503/CSerial--A-C-Class-for-Serial-Communications.htm

It probably addresses some of your concerns.
As for making a cross platform app .. you may get in trouble. It's beyond my reach.

Go Up