so... everything under the sun I've read shows communication from arduino back to processing but, what if you want to do things differently?
I've loaded and played with the serial, software serial and firmata libraries and can get some response back from processing into the arduino. However, it's painful to debug and almost impossible to get any type of consistency out of the communication?
WHAT AM I MISSING?!?!?!
basically, I'm using the OpenCV interoperability of Processing to send commands to my roboduino. Oh... for f*** sake what a disaster!
My servo's look like they don't get their meds. I can't seem to decipher the serial protocols sent to the arduino and there is no way to debug. I understand the whole ASCII, DEC, BIN communication standards, but without being able to decipher the receiving end, it is not pleasant.
So here I sit - in the waste of a desert oasis, trying to figure out what's real, and what is meant to cause me strife in this existence. Any tips?
Am I just out of step? Should I just be well and obey?
It can be frustrating to debug incoming serial, but there are a few things that can help. One is to use SoftwareSerial to send debug information back to your computer on a second serial port so you can see what is happening. Or you could connect a text LCD display to show the current state. And sometimes its enough just to light some LEDs to show where the arduino is in the code.
An approach that may help is to do your debugging with a test program designed for the purpose rather then using your application. The test program could indicate what was happening on the protocol using any of the above techniques.
Thanks for the advice. I think I'm just going to hook up an LCD. I've been meaning to get one and I think it will add to the project functionality as well as help with debugging.
One thing I used to do when trying to debug serial commands was that I had a first test programs which dumps every serial data it receives to EEPROM.
Then, a second program that I would later burn on the arduino would read back the eeprom and send it via serial on the Arduino IDE terminal.