Showing posts with label Robotics. Show all posts
Showing posts with label Robotics. Show all posts

Saturday, November 27, 2010

Just bought an Arduino, What's next?


This article briefly explain what is to be done just after purchasing an Arduino board. Even though the prerequisites of Arduino is less compared to other development boards, I think this article will be useful because Arduino is being popular among beginners. This article deals with the latest version of Arduino at the time of writing - it is Arduino UNO.
Setting up drivers
Connect Arduino to your computer via USB cable. It will power up from USB power. Now start Arduino IDE. If you have not Arduino IDE download from here. No need to install the software. Just extract using your favourite decompressing utility (my favourite is 7zip) and run the executable named 'Arduino'. Now you have to set up your IDE to work with your Arduino UNO. First select your hardware from Tools -> Board -> Arduino UNO (or your exact hardware name. If it is not listed, try to download the latest version). Next, select your serial port from Tools -> Serial Port. Selecting serial port is in different way different OS.
Linux
If the 'Serial Port' menu is not active, probably, your device is not connected properly. Try to reconnect. If more than one serial ports are shown in the menu, we need to find out which is the correct one. To do that, disconnect your arduino first. Then you probably need to restart the IDE. Then look at the 'Serial Port' menu and note down the listed COM ports. Then reconnect your device and track the newcomer. This is the easy way. Select it.
One of the problem I suffered while playing with arduino in my Ubuntu 10.04 LTS was that, the compilation of the program was a failure. It was a dependancy problem. So what I did is that, installed Arduino IDE as described here. But it was an older version and my device UNO is not listed in it. Then downloaded the newer version from the downloads page. That was really a tricky step!
MS Windows
In Windows, just after connecting your device to the PC, a device driver wizard appears and try to find the appropriate device driver for the device. It will take a while and at the end of the fight, it fails to find an appropriate driver. Close the wizard and go to 'Device Manger' (Either via Control Panel or by right clicking 'My Computer' then 'Manage'). Then you can find Aduino UNO as the unknown device. Right click on that and choose the option to manually install the driver. Then locate the directory where you have installed Arduino IDE. Then the system install the appropriate driver and now you can see your device on the list named 'Ports' in the Device Manger. In parenthesis, there will be the curresponding COM port number (eg: COM 4) . Then choose that COM port in the Arduino IDE.
Starting with 'Hello World'
The commonly accepted 'Hello World' in embedded devices is LED blinking. There is an example in the IDE itself. Open the file from File -> Examples -> Basics -> Blink
Look at the program. For an average C programmer, the program seems self-explanatory. To compile your program, choose Sketch -> verify/compile. Then to upload the executable to your device, choose,File -> upload to I/O board. If everything you have done is correct, you will get your Arduino programmed and starts working just after burning the program using the USB power. Disconnect it from USB and use in your standalone applications.
Read more..
Arduino Lanugage reference
Arduino Playground

Friday, January 1, 2010

PYRO : Python in hand with Robotics

Python developers all over the world are searching for fields that are not involved python. I recently found a good job by them - a boon for robotics enthusiasts - that is Python Robotics or simply Pyro.

Go to pyro project page

Download Pyro live CD

Many built-in python scripts are there to define the robotic brain and paths. Of course, you can write your own scripts. Anyway, pyro is a wonderful experience.

I encountered a problem while booting from pyro live CD. It seems to be mother board and chipset specific. My problem was, no x start up. It hangs up when displays "Probing/Loading AGP Modules...". I used several knoppix cheat codes to enter into kde desktop. It was successful. Thanks to knoppix developers forum. The boot time cheat code i entered is:

knoppix noagp

If you encounter any such problem, try to search for knoppix boot problems and not for pyro boot problems.

Sunday, December 6, 2009

Don't believe your eyes!


Don't believe your eyes, because everything you see, touch and feel is just a feeling only. Consider you are traveling in a space ship. No way to look outside. Space ship is traveling with higher velocity. If there is an obstacle present in front of the spaceship, sensors feel the presence of obstacle and it is reported on your computer. Then you turn the spaceship left or right. Then sensors feels that obstacle is removed (not obstacle, you!) and computer indicates that you can go straight way.
The above explained is a successful turning. But here I go in a something different way. The sensors are intelligent enough to send a fake signal that "there is some sort of obstacle" on the monitor. Actually, there is nothing in front of it. But your computer shows some obstacle. So you put a signal to turn right. Then the sensors shows that "now obstacle is removed. Go straight". You feel that you done well, but the sensor and the computer system really cheated you. Sometimes it was not a cheating, because ,there will be a possibility of thinking that there is an obstacle.
Our brain is not much different or error free in similar cases. If you are think that you know the universe, I think it is actually bad. Things you feeling from the surroundings may be different from reality. Your eyes are similar to the spaceship sensors. Not only your eyes, every sensors just see one phase of the reality. That really implies that knowing reality is too difficult.
I am not going too inside. I am not a philosopher. So let's have a fun. just go thruogh this link. A number of good eye illusions are included. Here I give a puzzle from eyetricks.com - Find which is longer?