Tag Archives: serial

PC to Arduino to LED Control, Source Code

Due to popular demand, here is the source code for my blog entry, “PC to Arduino to LED Control.” First the Processing Source code: // ButtonProc // Make a button on the screen that can be clicked // and cause an LED to turn on and off in synch on  // the Arduino.  Used in conjunction with ButtonArd. //  import processing.serial.*; Serial myPort;  // Create object from Serial class int val; // … Continue reading

Posted in Uncategorized | Tagged , , , | 3 Comments

GIRC test drive on blocks

GIRC (Graphical Interface for Robotic Control) is a ‘sketch’ written in Processing that enables user to draw a path file, save and reload, and transfer control codes to an Arduino-brained robot. The magnitudes of the turns and distances haven’t been … Continue reading

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

Disorganized workspace, organized mind (I hope)

Today I verified that the Arduino sketch still runs the servos, and then I did some organizing and planning. The note card on the left shows the listing for GIRC control codes (so far). On the right, I wrote out … Continue reading

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

A problem with Arduino arrays?

For days now I’ve been trying to troubleshoot why my computer and arduino won’t talk over the serial port. Finally, I took to commenting out all the arduino code and adding it back one line at a time. I assumed … Continue reading

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

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

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 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