SPARK Project #3, Post #3

Computers & Mobile
SPARK Project #3, Post #3
Make+Spark_Project3.jpg

SerialTermVB.jpg

In my previous post, I described how I was able to program an iCop eBox to transmit date using an XBee wireless link. The program was written in Visual C++ and executed serial port commands to send data to a host computer. I had previously set up the XBees to communicate at 115,200 baud, but the Visual C++ serial port configuration defaults to 9600 for the baud rate. I was able to find sample code for It and it was relatively straightforward to add code to my program whichchanged the baud rate to the desired value.

Then things got a little strange. I noticed that every time I ran my program, it would hang after the serial transmission. I also found that the program would crash if I tried to send more than 16 characters. There’s a long list of possible causes for such crashes, and I started to debug them one by one. The important part of this story is the outcome. Honestly, debugging can be unpleasant. I like a good challenge and have always enjoyed solving puzzles, but that’s not how I wanted to be spending my time with these SPARK projects. So back to the outcome of the story. After taking many small steps backwards in the debugging process, I finally managed to make a huge leap forward, out of programming darkness. I now have a Visual Basic program running on my iCop eBox, and it’s sending and receiving data from another computer using XBee transceivers.

Why is this so great? That’s a fair question. Read on at the SPARK site for the answer!

What will the next generation of Make: look like? We’re inviting you to shape the future by investing in Make:. By becoming an investor, you help decide what’s next. The future of Make: is in your hands. Learn More.

Tagged

Kipp Bradford is a technology consultant and entrepreneur with a passion for making things. He is the Senior Design Engineer and Lecturer in Engineering at Brown University, where he teaches several engineering design and entrepreneurship courses. Kipp is also on the Technical Advisory Board for Make Magazine.

View more articles by Kipp Bradford
Discuss this article with the rest of the community on our Discord server!

ADVERTISEMENT

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 16th iteration!

Prices Increase in....

Days
Hours
Minutes
Seconds
FEEDBACK