Tag Archives: processing

PC to Arduino: Serial BOF and EOF control codes

(First of all, I’ve tried to train myself to refer to the data sent over the serial port as ‘command codes’ but I always find myself lapsing into calling them ‘control codes.’ So I give up for today.) Here’s what … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

PC to Arduino: Hello, are you still there?

I wrote these two sketches to confirm that yes, serial port communication still works between Processing and the Arduino under the new Arduino IDE. The sketch on the left is written in Processing and writes to the serial port. The … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

Sending Serial Data from Processing to Arduino

I want to send data from my laptop to the Arduino-based robot. Processing is running on the laptop and Wiring on the Arduino. In Processing, the serial object is being called ‘myPort’ (it could have been called ‘Joe’ for that … Continue reading

Posted in Uncategorized | Tagged , , , , , | 1 Comment

Arduino Pin 13 as low-res serial monitor

Now that I have data to send from the computer to the arduino, I’d like to verify that it has gotten to the arduino. My original assumption was that I could echo back the data and read it on the … Continue reading

Posted in Uncategorized | Tagged , , , , , | 1 Comment

GIRC: Reviewing Output in the Processing Console

After I generate a path and convert the data into turn-and-move format, I want to send the data to the arduino-robot. For this I will use the USB/serial cable. But before I send any data, I want to make sure … Continue reading

Posted in Uncategorized | Tagged , , , , , , , , , | Leave a comment

GIRC Distance Commands

In the above illustration, the first Command Element has a command code of 44, which tells us that it is a Move command, and that we are to move 360 plus whatever is in the second Command Element minus 33. … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

GIRC Turn Codes

Here we make a 76 degree right turn in GIRC, and this information has to be sent over the USB/Serial cable to the microcontroller aboard the robot. This communication is done with a control code pair. As shown, the first … Continue reading

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

GIRC Path Data Conversion

The user inputs path data to GIRC by clicking points on the screen. Processing then draws segments between the points and calculates x,y coordinate data. This data is then converted into distance and turn data which will then be sent … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

Five Stages of Programmer’s Grief

I knew this, but I forgot it yesterday when I was working on GIRC. This convention of inverting the y-axis for screen display isn’t peculiar to Processing, it’s common to many programming languages. There is a way to change the … Continue reading

Posted in Uncategorized | Tagged , , , , | Leave a comment

GIRC Path Calculations

(ATTN Google Searchers: Click here for Generation Starship Orinoco.) The user guides the robot in GIRC by creating a path. The path is composed of segments which are created by mouse clicks. The program calculates the length (or distance traveled) … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment