University NASA Lunabotics Project

Hello,

My name is Yusif and I am an electrical engineering student at the Polytechnic Institute of NYU where I am on my schools NASA Lunabotics Team. The aim of the project is to create a autonomous or teleoperated excavator along specifications that mimic a lunar environment.

My part of the project is the controls interface and we have opted to use an Arduino/Wifly shield to communicate with the lunabot. I have a couple of sample codes that show how to connect the Wifly shield to a network but very little instruction on where to go from there. Can anyone recommend an example or a starting point for how to begin incorporating an analog joystick and it's corresponding readings to be received by the Wifly shield? I was initially planning on reading the joystick pins with a second Arduino, if someone could recommend how to achieve this I would be very grateful.

In advance I apologize if I am coming off vague or for any other shortcomings. This is my first post but I certainly hope it will not be the last.

Thanks in advance, Yusif Nurizade

Best place to start is allways on the tutorial section of arduino.cc to learn what the language can do (it can even more that is covered there)

An analog joystick can be covered by two analogRead()'s and IIRC the wifly shield comes with some samples. Start playing with them to understand the working .

Split the project into the components you need and try to understand every module (enough) before merging..

Succes, Rob

and we have opted to use an Arduino/Wifly shield to communicate with the lunabot. I have a couple of sample codes that show how to connect the Wifly shield to a network but very little instruction on where to go from there.

You say "the WiFly shield" like there is only one such device. Not true.

Support for WiFi on the Arduino depends on WHICH specific shield you are referring to. Better answers are provided for more specific questions.

Thank you for the replies guys! I'm sorry that I did not respond earlier but I was not able to view any responses the first few days and I've recently moved so I guess I slacked in checking afterwards.

So a couple of points;

I have been trying to break down the work into steps and got an Arduino connected to a joystick reading both analog (for movement) and digital (for buttons). My problem, and I really hope I can get some guidance with this, is the fact that I do not know how to read from the joystick over a WiFi connection. I've done the ethernet tutorial (that the WiFly commands are based on) but it is limited to having the commands be read via the ip address. I saw few other examples of people creating web pages with buttons that can be read by the Wifly but nothing regarding hardware inputs.

I was hoping someone had some advice on using the keyboard or a joystick on a computer and having the Wifly shield that is connected to an Arduino but not the computer take those commands to execute preprogrammed instructions. Someone suggested serial.read but that requires you to constantly hit enter which would make it difficult to control a robot in real time.

As for the Wifly, forgive me I thought there were several wifi shields but one Wifly, I am looking at it now and it is manufactured by Roving Networks, I ordered it from Sparkfun, here is the link to it on their site:

http://www.sparkfun.com/products/9954

Again thank you for all the help and I would definitely appreciate some more guidance. So far my Arduino/Wifly are independently powered, able to connect to a network and have already tripped LEDs based on instructions added at the end of the device's IP (on my computer). I currently possess enough sample code to create buttons on a webpage that will do what I want but I am looking for advice on how to get the same input from a keyboard of joystick communicated over Wifi.

Yusif

how to get the same input from a keyboard of joystick communicated over Wifi.

you must translate device specific commands to aplication specific command before sending them to the device.

A keyboard and joystick are both input devices but they give different "signals" Put a software layer in between to "normalize" this to commandset which might be identical to the keyboard commands. This latter is not necessary as one could create bytesize short commands to be send over wifi (shorter, faster transmit, easier to parse etc)

does this help?