So here is my delima: working on a customized GPS program using Unfolding Maps. I am at the point where I can turn a mouse click into a two element string of Latitude and Longitude, remove "(" and ")" and save as a string. Each mouse click, up to twenty, will add a new coordinate to the String[] and save to a txt file, which is then dynamically displayed on the screen. What I am trying to do is to take that list of coordinates, parse out Lat and Lon into floats and then put a dot (ellipse) on the map at that coordinate. This is kicking my butt. What on the surface seemed straight forward has turned into a headache. Please help!
With the above code, I can get red ellipse to appear at the coordinates when the mouse button is pressed, but it the end state is to parse the saved WayPoints.txt file, and display an ellipse at those coordinates. This is only a small portion of the overall code that includes ControlP5 elements for an onscreen keyboard, tabs, etc...
I'm thinking that I need to split waypointList[] at each ',', read those two elements into a new String[] or String[][] and then convert each element into a float of somesort.
General question before I get too deep here: I have am writing a program (or rather this is just part of a much larger program) that needs to read string values into a text file from two different source: source 1) dynamically learned over a wireless network (via custom generated nmea-type sentences); source 2) user specified input via on-screen keyboard. these strings need to be read into a text file and displayed on screen as list.
BUT heres the rub: this same array of strings needs to have the ability to be modified by the user, i.e. strings within the array need to be able to be remove/deleted as the user requires. and all of this displayed on the screen as the changes are made.
Any suggestions? I have come across several useful forum posts already that address various aspects of what I'm trying to accomplish just need some advice. Would a .txt file or .csv file be better?
Just a general question to throw out there: Has anyone tried to use the Button or Bang class to pass values into Textfield with controlP5? I am working on a customized gps app to run on a touch screen platform and need to implement an on-screen keyboard. I get my functions to do what I want with a physical keyboard, but need to get a virtual one to do the same.
I can get Buttons (or Bangs) to work and register controller events, but marring that with the Textfield class is getting to be real bugger.
Okay, so here is what I ULTIMATELY hope to accomplish, if possible:
I am writing a GPS program in Processing 1.5.1 utilizing mbtiles and Till Nagel's awesome Unfoldingmaps library.
The program will run on a BeagleBone or BeagleBoard XM running either WinCE or Linux (leaning toward Linux).
An Arduino with a GPS-Bee will pass the GPS data over USB Serial to the Beagle and into Processing.
I have just acquired a 4D Systems uLCD 43PT-GLX resistive touch screen that I would like to use as the graphic display/interface, however it is a serial device. I can get processing and the screen to pass basic strings, characters and integers back and forth.
Is there anyway to "stream" the void draw() output over serial to the LCD? I would like to make the LCD Processor's primary display method, but the more I dig the more I think that what I'm trying to accomplish will require significant re-writing of the core code and that is just a hole I don't want to go down! Any input would be greatly appreciated!