In SX Microcontrollers, SX/B Compiler and SX-Key Tool, MSDTech wrote: [b]Let me start by thanking Jon Williams for all of the excellent articles on SX/B programming[/b]. He has made the learning curve for a new controller and language much less steep. I'm currently rebuilding Sparkey (the name given to my robot by the Superintendant at the school where I work). During the rebuild, I am addressing the laundry list of things that did not work as well as I would like on the previous builds. Two of the items being addressed by this project are: 1. The vex motors that drive the tracks do not run at a consistant speed. The robot does not consistantly run in a straight line, which is normal for these small continuous rotation servos. I wanted a method of measuring their rotation to allow adjustments in the program. 2. The code for flashing the turn signals consumed the main processor, causing pauses when the lights were flashing. This wasn't a problem if the robot was staionary, but could cause it to miss a turn point while it was moving. Thanks to the Parallax Daily Deal, I ended up with a PDB and an SX Blitz. So I figured it was time to learn a little more about the platform. With it's ability to do periodic interupts, it was perfect for monitoring the motor rotation. The $10 cost of the SX/28 Proto Board also convinced me that using this as a platform for auxilliary processors is a good idea. At the same time, the Robot Club at the school was investigating line following robots, so I ended up with several sets of QTI Line following sensors. These looked like a reasonable candidate for an encoder sensor. Mounting an encoder disk on the inboard side of the track idler wheels and drilling out the mounting hole on the QTI so that it would slip onto the idler wheel axles, these made a nice compact encoder. The QTI sensors are wired as shown on the bottom of page 2 of the QTI Line Follower AppKit for the Boe-Bot Manual to provide a digital input. I was able to modify Jon's sample from the N&V article 144 to monitor and count the pulses as the idler wheels rotate. Since I had space and pins available, I also added some code to control the tail lights and flash the turn signals. I guess you always have to start with an LED project whenever you pick up a new processor. The system has been tested using the setup on the PDB and has functioned to meet my expectations. The next step is to commit the device to solder. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=321306 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)