Sunday, June 20, 2010

Kent Display Driver

I finally managed to finish the basic interfacing of my 320x240 Ch LCD Kent Display to my Arduino, hardware issues and work busyness have been slowing me down. For now it just includes the SPI functions from the datasheet. Next, I will be adding some higher level functions to draw, write text, etc. The biggest issue I encountered was getting a good connection between the Duemilanove pins and the breakout board from Sparkfun. I ended up buying a Screw Shield and then soldering a piece of protoboard to the header that I soldered to the breakout board. All of the commands seem to be getting to the display now! Here's a video of the test code in action!
Here's the (working) hardware connection:
Here's a shot of the screen after a full refresh running the test code (since my video camera is cheap and you can't really see it in the video):
The driver with the test code is located at my code hosting blog: A1 Code, I'm trying to come up with a better means of sharing my code as the tabbing and formatting is kind of messed up but it does work if it is copy-pasted from the blog.

Sunday, June 6, 2010

Acrylic Prototyping Board

So I've been working on my Kent Display driver but had a hardware connection failure between the female header pins on my Arduino and the male/female jumper wires that Sparkfun sells.  Turns out the connection is a little too loose and now I have to hold the jumpers sideways to get any communication to work and even then it is unreliable.  So in the meantime while waiting for my ScrewShield to show up and make a solid connection I put together an acrylic back-plane for my breakout boards/breadboards to sit on. All you need is a piece of Acrylic (mine is 25x50cm), some small bolts (3mm ones are nice for the 2 bigger holes in the Arduino Duemilanove) to attach whatever boards you're planning on using, and (optional) some sticky anti-scratch feet for the bottom (so your wife doesn't get mad about her dining room table getting destroyed!).  For tools you will just need a drill, bit, and maybe some pliers for the bolts.
Marking the Acrylic for drilling is easy since you can see through it.
Just gotta add the feet and the sticky back breadboard.
 Finished product with plenty of room to add more later!

Sunday, May 30, 2010

Raceduino Live!

My Raceduino project concept has been posted!  I mainly wanted to put an overview of the design together to try and capture all of the features that could ever be useful.  Now it's time to start working on the individual stages of the project, starting with the Kent "No-Power" Display that will be central to it.  Next week I'll be posting basic display driver code based on the SPI commands listed in the Datasheet, then its off to writing some higher level functions to draw lines, etc. on the display.  I'm doing all of this on my Duemilanove for now, but I think the final product will need something more beefy, such as the Mega.  Any other 'Duino based boards I should take a look at?  (I'm mainly interested in tons and tons of digital I/O)

Sunday, May 23, 2010

RGB LED Fun


Here's the first thing I programmed up with my new Arduino! (I'm not new to Atmel μcontrollers but new to the Arduino) It's just a diffused RGB LED that goes red-green-blue-yellow-purple-turquoiseish (last one was supposed to be white, got tired of fiddling with it). Figured I'd post the code since Sparkfun didn't have a link for an Arduino example, just the Wiring example I took and modified. All that really needs to change from the example is the PWM pins since they are different on the Arduino.

int RED = 3;    // RED pin of the LED to PWM pin 3
int GREEN = 6;  // GREEN pin of the LED to PWM pin 6
int BLUE = 5;   // BLUE pin of the LED to PWM pin 5
int gw = 0;

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  for(int r = 0; r < 64; r+=1) {
    analogWrite(BLUE, 0);
    analogWrite(GREEN, 0);
    analogWrite(RED, r);
    delay(60);
  }
  for(int g = 0; g < 64; g+=1) {
    analogWrite(BLUE, 0);
    analogWrite(RED, 0);
    analogWrite(GREEN, g);
    delay(60);
  }
  for(int b = 0; b < 256; b+=4) {    
    analogWrite(RED, 0);
    analogWrite(GREEN, 0);
    analogWrite(BLUE, b);
    delay(60);
       /* Code if you want to "see" what's going on the Serial Monitor, useful for debugging
        Serial.print(r);
        Serial.print("\t");
        Serial.print(g);
        Serial.print("\t");
        Serial.print(b);
        Serial.println();*/
     
   
  }
  for(int y = 0; y < 64; y+=1) {
    analogWrite(BLUE, 0);
    analogWrite(RED, y);
    analogWrite(GREEN, y);
    delay(60);
  }
    for(int p = 0; p < 64; p+=1) {
    analogWrite(BLUE, p);
    analogWrite(RED, p);
    analogWrite(GREEN, 0);
    delay(60);
  }
    for(int w = 0; w < 64; w+=1) {
    analogWrite(BLUE, w);
    analogWrite(RED, 0);
    gw=w;
    if(gw != 0)
      gw+=5;
    analogWrite(GREEN, gw);
    delay(60);
  }
}



Next I'll be posting about the project that I actually got all this hardware for; note the Kent Display in the pic :)

Sunday, May 16, 2010

First Post

Kind of a placeholder first post, I'll be posting an Arduino test project later, but I had this "prayer" sitting around after stealing it from somewhere... and I get to link my mustang's first run with the 427!


The Mustang is my shepherd;
I shall not want.
It maketh me burnout on black pavements;
It leadeth me beside busy freeways;
It restoreth my soul;
It leads me in the path of quickness for its names sake.
Yea I walk through the valley of rice, I shall fear no turbo for Torque art with me.
Thy rod and thy piston they comfort me.
Thou preparest a track for me
in the presence of mine enemies.
Thou hast anointed my bearings with oil;
My car overpowers.
Surely traction and victory shall follow me,
All the days of my life.
And I shall dwell in the house of the V8 forever
Amen