Pages: 1 [2]   Go Down
Author Topic: Program a GUI in C/C++ for arduino and mouse cursor control  (Read 13641 times)
0 Members and 1 Guest are viewing this topic.
Germany
Offline Offline
Full Member
***
Karma: 0
Posts: 214
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Good Luck!
Logged

using Arduino Uno Rev 3

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 551
Posts: 46240
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Germany
Offline Offline
Full Member
***
Karma: 0
Posts: 214
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

using Arduino Uno Rev 3

Offline Offline
Full Member
***
Karma: 0
Posts: 153
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ..
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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).
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 153
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: August 04, 2012, 12:24:13 am by Carsten53T » Logged

Pages: 1 [2]   Go Up
Jump to: