Pages: [1]   Go Down
Author Topic: Interfacing Arduino IDE and openGL/Matlab  (Read 1524 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I was wondering whether it was possible to interface the arduino IDE and another software, particularly openGL and Matlab. My program requires some data to be sent between openGL and arduino, such as the rotation integer of a primitive, or the mouse co-ordinates on a screen in real-time. Thus storing data in files is not a viable option.

Your help will be much appreciated. Thanks in advance.
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 19
Posts: 3114
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Try http://arduino.cc/playground/Interfacing/Matlab. Don't know about opengl. Can it access a serial port?
Logged

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

Quote
Don't know about opengl. Can it access a serial port?
OpenGL is a graphics rendering language. It is not standalone software. The application that is using OpenGL for drawing could open the serial port that the Arduino is connected to, and send any data needed to the Arduino.

What the Arduino is going to do with the coordinates of the mouse on the screen is a mystery, of course.
Logged

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

Thanks for the response guys. I will defo check out that link now thanks! The openGL code will most probably be written in C or C++, of which I have not heard anything about communicating with the serial port. I was thinking reading/writing files but getting the three softwares to do this in real-time, and have similar run-times will be hard.

I'm not exactly going to be using mouse co-ordinates in the arduino, was just an example. It's more a case of creating some GUI in openGL, signal processing some input data using matlab and some hardware interface based on the arduino. The arduino will be simply commanded using a binary word about the status of it's ports and how to process data.

I'm not going to be using an arduino for this project as the bit rate is too low, but I recon it is probably a good starting point as I have not tried interfacing a micro-controller with several environments before.
Logged

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

Quote
The openGL code will most probably be written in C or C++, of which I have not heard anything about communicating with the serial port.
Both C and C++ support reading from and writing to the serial port. Not easily, but it can be done.

C# makes reading from, and writing to, the serial port trivial, AND can call openGL functions. I know, because I have a very fancy application that does just that, written in C#.
Logged

Pages: [1]   Go Up
Jump to: