Offline
Newbie
Karma: 0
Posts: 12
|
 |
« on: April 26, 2012, 10:24:57 am » |
I am using sweeping a ping using a servo to map out space using x-y coordinates. I know at all times what degree from origin the ping is pointing and the distance it is reading. How would I go about showing this graphically on a computer screen? I'm familiar with outputting strings to the serial console, but how do I display this information graphically? Is there some kind of graphical display library somewhere? I'm essentially looking for it to look something like this: \ 2.30m / \ * / \ / \ / \ / Ping
If I were to walk around the room, the dot would track left/right and display the distance above it.
|
|
|
|
|
Logged
|
|
|
|
|
Gosport, UK
Offline
Faraday Member
Karma: 19
Posts: 3117
|
 |
« Reply #1 on: April 26, 2012, 10:30:55 am » |
I'd just send the position data serially to the PC, and write something on the PC to display it.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 12
|
 |
« Reply #2 on: April 26, 2012, 10:57:39 am » |
Since I have absolutely no clue as to how I would do that, I'm hoping there's an easier way?
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Online
Brattain Member
Karma: 277
Posts: 25541
Solder is electric glue
|
 |
« Reply #3 on: April 26, 2012, 11:00:27 am » |
That is the easy way. Look at interfacing to the Processing language.
|
|
|
|
|
Logged
|
|
|
|
|
Gosport, UK
Offline
Faraday Member
Karma: 19
Posts: 3117
|
 |
« Reply #4 on: April 26, 2012, 11:03:26 am » |
Never tried it, but Matlab might do want you want.
|
|
|
|
|
Logged
|
|
|
|
|
Hannover, Germany
Offline
Jr. Member
Karma: 0
Posts: 50
|
 |
« Reply #5 on: April 26, 2012, 11:04:13 am » |
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 12
|
 |
« Reply #6 on: April 26, 2012, 03:43:05 pm » |
Yep, that's it. That is essentially the easy part...for me anyways. What I don't have is the knowledge after this point. What is this Processing languauge, how do I use it, and how do I translate it to graphics on a screen?
Thanks, Eric
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Online
Brattain Member
Karma: 316
Posts: 35534
Seattle, WA USA
|
 |
« Reply #7 on: April 26, 2012, 04:45:13 pm » |
What I don't have is the knowledge after this point. What is this Processing languauge, how do I use it, and how do I translate it to graphics on a screen? http://www.processing.org
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 12
|
 |
« Reply #8 on: April 26, 2012, 10:29:58 pm » |
Thanks! Looks like I've got something new to learn and it will definitely do what I want. Could I also use this Processing to display on say, a square phone LCD...remove the computer from the equation entirely?
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Online
Brattain Member
Karma: 277
Posts: 25541
Solder is electric glue
|
 |
« Reply #9 on: April 27, 2012, 01:54:19 am » |
You can use other protocols like OSC that allow you to talk over a network to smart phones. Or you can use it to set up a web server that your phone can tap into.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 12
|
 |
« Reply #10 on: April 27, 2012, 10:35:00 am » |
I meant actually having an LCD from a phone on the device...I see them for sale here and there...square, color, I think from a Nokia? Would I have to use processing, or just draw the lines and dots on the LCD using the library for it?
|
|
|
|
|
Logged
|
|
|
|
|
Gosport, UK
Offline
Faraday Member
Karma: 19
Posts: 3117
|
 |
« Reply #11 on: April 27, 2012, 11:16:01 am » |
You could attach that directly to the Arduino.
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Online
Brattain Member
Karma: 277
Posts: 25541
Solder is electric glue
|
 |
« Reply #12 on: April 27, 2012, 01:44:52 pm » |
Well it depends on the model of the display. It also takes a lot of processing power to drive it directly making your main task more difficult and less accurate. You are better off with an LCD shield that contains the chips for the memory and refresh circuits. Processing, the language would not be involved.
|
|
|
|
|
Logged
|
|
|
|
|
Gosport, UK
Offline
Faraday Member
Karma: 19
Posts: 3117
|
 |
« Reply #13 on: April 27, 2012, 02:22:36 pm » |
You are better off with an LCD shield that contains the chips for the memory and refresh circuits. Yeah, that was what I meant.
|
|
|
|
|
Logged
|
|
|
|
|
|