Udpate: We made it on Hack A Day! Checking out wifi solutions for an Arduino based platform, we found AsyncLab's WiShield and really enjoy it. There's a bunch of new stuff on their site now like the YellowJacket but back when we did this project the WiShield 1.0 was all there was. There's quite a lot of features and programming options, as well as a nice community forum. We were looking for an Arduino wifi solution for a large computational intelligence project and figured if we could build a robot with a wifi shield then it'll be good enough for the more complex project. We decided to use the SocketApp functionality for this robot project, using TCP port 9000 for communication. The WiShield connects to WPA2 access points fine, but association is much faster on unsecure access points. Using the Arduino libraries from their site, the sketch writing was extremely simple. Navic wrote a C program to communicate with the robot. The first client system to control the robot was a hacked Zipit Z2 we read about from Hack A Day. The robot consists of simply two servos that provide locomotion, a micro servo that moves a Sharp IR distance sensor side to side, the Ardino, WiShield and battery pack. KoD created the blasa wood body in minutes and balanced the weight of the electronics to make sure the little robot didn't tip over. Hardware and software was developed very quickly in just a couple hours. The commands are 0-9 and sent to the WiShield over the socket connection. The Arduino takes the command and performs the tasks with the servos and IR sensor. Navic wrote in a command to allow the robot to autonomously rove for 20 seconds. After using the Zipit and C control program, we realized typing in 1 to scoot forward wasn't much fun. We had worked with the Python 4-Axis Servo Control from Principia Labs, so we used their code and modified the main loop to take user commands, keeping the old numeric system, but added 6 to the list in which the program allowed the connected joystick to issue commands to the WiShield. This was much better for controlling, although the Zipit couldn't be used since it doesn't have a USB port :( but either way it's a fun little demo of the WiShield. Attached below are the Arduio sketches as well as the client control programs both in C and Python. The original model: Video Gamer? Check Out ChatCast! Removing the stop after each command creates an interesting ability for the joystick control, as well as a problem for the IR sensor. Using the speed of the servos, we can determine what distance away the IR sensor must be worried about an object, so the forward motion and IR readings will occur in enough time for the change in motion to take affect before collision. This video shows how well we did: The final modification with the joystick input and Python control program. Parts List: 1 Arduino Duemilanove (ATmega328) 1 WiShield 1.0 from AsyncLabs 1 Sharp IR Sensor from SparkFun 1 Micro Servo Futaba S3114 2 Full rotation servos from Parallax We built a balsa wood frame and used two pre-made balsa circles for wheels. Glue rubber bands to the wood wheels to add traction. Also used a power bar from a small breadboard to run all the power lines. |