Lifelong Learning Knowledge should be uncompromisingly sought after and freely given away.

9Aug/090

Communicating With Ardunio Using Micrsoft .NET (C#)

Being a .Net developer, I figured I needed to know how to get my applications to talk to the Ardunio board via the USB serial port. Took a few hours to get the Ardunio code working, but here is the final results.

I setup a simple VS2008 C# project (you'll need to modify to compile with VS2005) to turn a LED on and off by clicking a button on the form. You'll need to change the hard-coded COM port to the correct one for your setup and hook up the LED (don't forget your resistor) to the digial PIN 12 on the Ardunio board.

  •  A few things to note: 
    • I'm using a fixed char command "INLENGTH" which will need to be updated if you wish to increase the command char length.
    • I've used # to pad the command when I don't have a 6 char command.
    • LED must be on digital PIN 12 (you can change this in the code of course).
    • COM port is hard-coded in the .Net code for my setup, change to correct COM port on our computer.

 

ArduinoSerialCommTest
Title: ArduinoSerialCommTest (758 clicks)
Caption:
Filename: arduinoserialcommtest.zip
Size: 43 KB

ArduinoSerialCommTest
Title: ArduinoSerialCommTest (758 clicks)
Caption:
Filename: arduinoserialcommtest.zip
Size: 43 KB

Tagged as: No Comments
7Aug/090

Learning To Count Again..

Arduino Seven Segment Display Project

I decide to stop by Radio Shack and pick up a seven segment LED (RHDP) so I could learn to use it with my Arduino board. I had actually ordered a few from Jameco but I had a couple of hours to kill today so I decided to feed my impulse. The cool thing about these displays is that they are really easy to use. You can see in the pictures there are lots of wires, it basically takes 1 digital output per segment and a common ground to run it (I didn't use the decimal point), but really the coding was super simple. Ignore all those resistors on the picture below, I didn't have a 68ohm resistors so I had to improvise with some lower ohm resistors put in series. This is a very satisfying project and only took me about 45mins from start to finish, highly recommended for those new to the Arduino board... I've included a ZIP file with the code and a few hi-res pictures for anyone instrested.

 

Arduino Seven Segment LED Project

SevenSegmentLED
Title: SevenSegmentLED (825 clicks)
Caption:
Filename: sevensegmentled.zip
Size: 1 MB

SevenSegmentLED
Title: SevenSegmentLED (825 clicks)
Caption:
Filename: sevensegmentled.zip
Size: 1 MB

1Aug/090

The wonderous Arduino board…

Arduino Board

A few weeks back my wife decided to send me a link at work with some DIY doggie stairs project. A subtle sugestion I think to get me to add this to my list of DIY pojects...in all honesty I figured this was just the project to get my mind of the madness of work. Besides, it would allow me to fire up my lovely collection of power tools, I decided right then to move this project to the top of my list. I headed out to Google to research (as I do with all my projects). After a few hours reading through the numerous DIY doggie stairs projects I found one here that I thought I'd use as the framework for my project.

You'll quickly see why I chose this one to base my project off of. It involved electronics! I very quickly dismissed the idea of using the motion dector he used, too bulky, too hack-n-slash and not challenging enough for me. I decided to go about building it from scratch. This is when I got re-introduced to the Wonderous Arudino Board.

I say re-introduced as I had read about these a few months earlier but was far too pre-occupied with one of my other hobbies (metallic reloading). These things are amazing, I've opened up a whole universe of learning with this one...

Tagged as: No Comments