in Programming

Arduino motorized cart project

For our embedded systems class, our team decided to work on a project using a mobile phone interface to drive an Arduino-based motorized cart.

My first night with the Arduino and cart was very productive. I started experimenting with just the Arduino connected via USB to my MacBook Air. I made the light blink and had it spit back some output over the serial connection.

Next, I wanted to try to get the wheels spinning on the motorized cart. Our TA sent me a lab from a different class discussing the motorized carts. It gave a sample of some Arduino code to drive the cart, and where to connect the pins. Although I was confused at first about how to connect the cart to the Arduino, it soon became obvious. I hooked things up and ran the code and soon had one of the wheels rotating back and forth.

Although we wanted to setup communication with the Arduino through an XBee device, our TA feared it would be too complicated. He gave me an ethernet shield for the Arduino and said to try to get that working first. So, I stuck the ethernet shield over the Arduino and loaded a sample program that would print the device’s DHCP-assigned IP over the serial connection. That only took a few tries to get working.

One of the examples included showed how to setup a telnet server. I figured this would be the easiest way to send commands to the device over ethernet, so I experimented a bit with it. It seemed to work just fine. Next, I merged some of the servo-driving code into the telnet server. I made it so you could type certain characters, and they would each control a wheel, and movement forward and backward. It was very straightforward to setup, and I think we’re ready to move onto the XBees.

Motorized cart and Arduino