Hello, I've noticed that there have been multiple other posts about this problem but I haven't found that many of them have solutions and of the ones that do, none of them seemed to help with my lag. I'm working on a processing front panel to run a quadrotor I've built. When I use the Arduino serial terminal I get lightning fast serial connection and response, so i've been typing out all the feedback to the Arduino by hand. Obviously that's not practical, but a test to show wiring/OS is not the problem here, it has to be something in Processing.
The problem is right now I have feedback being sent to the dashboard about ten times per second and right now just the first bit of information is being parsed and displayed for simplicity purpose. This was extremely laggy so I decided to print to the terminal in processing. It appears that whenever the arduino sends "/t" or "/n" it will pause for 100 ms or so, just an estemate. Otherwise the chunks of text appear just as they should rapidly as they would in the Arduino term.
Another weird thing, just for thought is that the transmit is running lightning fast from the computer, I know this for sure because whenever I move the slider on the dashboard to change the throttle it will make the rx light on the quad pulse.
This is what I've got for the main code running the program:
void setup() {
size(360, 400);
font = loadFont("BankGothicBT-Light-24.vlw");
textFont(font);
println(Serial.list());
throttleBar = new VScrollbar(80, 20, 40, height - 95, 1);
arduino = new Serial(this, Serial.list()[1], 57600);
I've been trying to think of a way to make flames on a rocket flicker for a game I've been working on and I am using an SVG to store the rocket's image. The flames are actually just square components in the image and I was wondering the most efficient way to change their opacity. At first I was going to store 25 different SVG's until I realized how inefficient and slow that would be. My next Idea was to edit the SVG file while the game was running, but the process of opening editing saving and reloading the image would be very processor heavy, especially on an android device loading off and SD card (I plan on porting this to Android when I finish). I was wondering if there was a better way to do this, like just accessing the element in the SVG by ID and setting it's opacity that way if that's possible.
Hi, I've been having troubles drawing 2D shapes on to a "GUI" layer while having a 3D view running in the background, the problem I have is when I try to move the camera in 3D it brings the 2D shapes I'm trying to draw to the screen out of view, thus making my button look incorrect. I was wondering if there was a built in method or any method anyone knows of to draw directly to a "GUI" layer that will never move.
I've been trying for a while now to try to figure out when a finger has actually been touched down on the screen. I know how to sense the X and Y coords which are very easy to find but I was wondering if anyone could point out a way to actually sense when the finger has actually touched down and been lifted up off the screen.