Saturday, January 10, 2009

Microcontroller - Writing the code

After reading through the book that came with the Basic Stamp 2 kit, I felt ready to write my own program. I did some research online and found Shaun's Website. He had sample code for both the Visual Basic side and the Basic Stamp side. WOW! It was nearly perfect the way it was. I had to do some major work on the Visual Basic interface, but the serial communication code on both sides gave me a BIG help. (Thanks Shaun)

I tweaked the Visual Basic code to do the following:
1. Look like the back of my camera
2. Have buttons pre-assigned to a task (such as focusing the camera)
3. Configured a 'Settings" page with variables that would pass between forms.
4. Configured timers to assist with tasks
(such as a 500ms timer from when you take the shot and release the shutter button)

I also tweaked the Basic Stamp code to create my own subroutines but it's fairly siimilar to Shaun's example.

Here are some helpful links for programming the Basic Stamp 2 module

Parallax Documentation

*will link more later

No comments:

Post a Comment