Pages

15 March 2012

Moving in a Shape: Basics of Bluetooth

Well, I decided to do some work on bluetooth messaging so that I when it comes time to real swarm algorithms and such, I won't have to keep referencing guides and stuff for how to send and receive messages. So, I designed this little program that, on the master:
  1. Opens a bluetooth connection with the slave.
  2. Runs a designated shape path (triangle, square, decagon, etc);
  3. Sends the total degrees turned by the right wheel (total encoder reading)
  4. Quits the program.
Meanwhile, the slave:
  1. Receives the encoder rotations
  2. Runs through a loop that does the number of turns and straight runs = to the number of turns encountered by the master which is sent to the slave
  3. Disconnects from the master
  4. Quits
Here's a little video:

Note: I realize the shapes aren't perfectly normal, and that the slave ends up in a different orientation than the master. I realized what was going on after I taped this, and I didn't feel like doing it again, but I will explain why. After each turn/straight, I had the master and the slave wait for 50 milliseconds, but I forgot to state motors A & B should be = 0, so there was a minor rotation error. Because the slave had a battery on max charge, it rotated more through those 50 milliseconds than the slave did, which had a mere 6.2 volts of battery. And there you have. An explanation for the discrepancy.

Here are some pics, in case you want to see how the robots are built:

 
 
Later on, I'll make a post on my Projects tab for this project. Until next time, then.


12 March 2012

Slowly, but Steadily


Well, 3 months have passed, so I'll tell you what's happened.

A bunch of coding for drivers has been done in NXC by Matt Allen after a very nice, long chain of responses on the Mindboards forum from my original post. It's good to know the NXT community caters so fast to people who are in need of help.

Meanwhile, I was also trying to follow Dexter Industries Wifi Week tutorials on using the Wifi Sensor. However, those were unsuccessful right from the start too. I keep getting an "unexpected warm boot (possibly low battery)" error. However, I am currently talking with a DI professional, so hopefully, everything will work itself out.

Apart from all that, I was getting down the basics of bluetooth. In RobotC, I whipped up a quick remote control program that allows me to control the speed of another NXT vehicle with a Ultrasonic sensor and can make it turn left or right with the arrow keys. So that's definitely a start. I think I'll be focusing more on the swarm aspect of the project through bluetooth for now, staying in the autonomous realm. Later, when I get the hang of the Wifi Sensor, I'll make the shift to a user controlled swarm.

In other news...

I recieved an NXT omniwheel keychain courtesy of Xander. I was one of the three winners in his NXT haiku contest, which was pretty neat.
You can his post HERE

There is also a chance to win a free DI dCompass sensor.

Just head on over to the Guy NXT door blog and subscribe, and you'll be entered in a random lottery for the dCompass sensor. His blog is HERE

One last thing before ending this post. My team recently competed in the FTC State Championship last weekend. We were 3rd in the 5th round, but after the 6th, we dropped to 7th. However, the 3rd place team did choose us as their alliance partner. Therefore, when all is said and done, you can say we safely came in 3rd place.

And that about wraps it up. Till next time.