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