Swap With Dell 9300

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Sunday, September 25, 2011

InduinoX: Blinking LEDs

Posted on 11:07 PM by Unknown
Having received my arduino and basic components kit earlier last week, I sat out to write my first arduino program. A hello world of sorts. I started out by installing the arduino package in Kubuntu. What you get from the package is a simple IDE which can compile and upload the code to the arduino board. For installing the IDE on other flavors of linux, head on over to the arduino site.

I connected the InduinoX board to my laptop using a USB cable. Selected the correct board type in the IDE using Tools --> Board --> Arduino Deceimila, Duemilanove, or Nano W/ ATmega 168. Next select the correct USB to use from Tools --> Serial Port. And finally wrote these first lines of arduino code :)

void setup() {
  pinMode(11, OUTPUT);  // Prepare red LED for output
  pinMode(12, OUTPUT);  // Prepare blue LED for output
  pinMode(13, OUTPUT);  // Prepare white LED for output
}

// a function which executes again and again
void loop() {
  redLight(HIGH);    // Turn on red LED
  delay(100);        // Wait a few moments

  redLight(LOW);     // Turn off red LED
  blueLight(HIGH);   // Turn on blue LED
  delay(100);        // Wait a few moments
  
  blueLight(LOW);    // Turn off blue LED
  whiteLight(HIGH);  // Turn on white LED
  delay(100);        // Wait a few moments
  
  whiteLight(LOW);   // Turn off white LED
}

void redLight(int status) {
  digitalWrite(11, status);
}

void blueLight(int status) {
  digitalWrite(12, status);
}

void whiteLight(int status) {
  digitalWrite(13, status);
}

A successful compile and upload later, the LEDs on the InduinoX board started blinking. Yay!!! To know which LED is connected to which pin, take a look at this page. Make sure the jumpers above the LEDs are in the right position.



More updates in my next post.

Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in arduino, electronics, leds | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Installing Boxee on Gentoo: my experience
    You have probably heard of Boxee and Gentoo (come on). I wanted to give Boxee a try, because of all the movies and tv shows that I can watc...
  • InduinoX: Interfacing with LCD
    After my quick Hello World app , I became a bit more adventurous and decided to interface with the LCD screen that was part of the basic ki...
  • InduinoX and wireless relays: Part I
    It has been a while since I received my wireless relay and I finally got some time this weekend to put them to good use. The connections we...
  • IR remotes
    As part of my  home automation project , I also wanted to control my home entertainment system. The controller can be a web interface or an ...
  • InduinoX: IR receiver
    From my previous post , you probably understood how IR remotes work in general. Now lets take a look at how we can read the signals coming f...
  • Attesting General Power of Attorney in SF
    Recently I had to go through the motions of getting a General Power of Attorney (GPA) document attested in San Francisco. I am an Indian by ...
  • Google Chromium (the open source chrome browser) on Gentoo!
    Chromium is not yet complete no matter what I say here. Please do not post bugs or assume this is the final version of chromium. It still la...
  • What Darwin Never Knew: DNA
    I just finished watching one of the best PBS NOVA episodes - "What Darwin Never Knew". It is exceptionally good. I was finally abl...
  • VirtualBox additions
    I got everything working from with in virtual box, except for the additions. I was able to run VBoxLinuxAdditions.run (from the Guest additi...
  • Building a linux gaming PC: Update 1
    Today I received my 1GB memory, the upgrade I require to transform my media center desktop PC into a moderately powerful gaming PC. I am sti...

Categories

  • 555 timer
  • arduino
  • delay circuit
  • electronics
  • gentoo
  • home automation
  • induinox
  • ir emitter
  • ir receiver
  • ir remote
  • kubuntu
  • lcd
  • ldr
  • leds
  • lucid lynx
  • oscilloscope
  • picoscope
  • probots
  • receiver
  • relay
  • relays
  • scope
  • sensors
  • simple labs
  • sony remote protocol
  • transmitter
  • virtualbox
  • virtualization
  • wireless relay

Blog Archive

  • ▼  2011 (12)
    • ►  December (1)
    • ►  November (1)
    • ►  October (6)
    • ▼  September (4)
      • Purchase experience with Probot
      • InduinoX: Interfacing with LCD
      • InduinoX: Blinking LEDs
      • Purchase experience with Simple Labs
  • ►  2010 (5)
    • ►  May (1)
    • ►  March (1)
    • ►  January (3)
  • ►  2009 (10)
    • ►  December (5)
    • ►  November (3)
    • ►  May (1)
    • ►  April (1)
  • ►  2008 (29)
    • ►  August (1)
    • ►  June (1)
    • ►  May (4)
    • ►  April (1)
    • ►  March (1)
    • ►  February (10)
    • ►  January (11)
  • ►  2007 (7)
    • ►  May (5)
    • ►  April (1)
    • ►  March (1)
  • ►  2006 (8)
    • ►  November (1)
    • ►  October (3)
    • ►  September (2)
    • ►  August (2)
Powered by Blogger.

About Me

Unknown
View my complete profile