Welcome to dx4-blog. Here you can find some interesting information about many things, most of them are computer related. The main site is www.thedxsite.info. Also visit the forum for more stuff. Have fun. :)
Πέμπτη 13 Ιανουαρίου 2011
Emu 8086's robot program complete!
The emu 8086's robot can be seen in the image on the left. The map is 9x6 and you can make any map using the tools provided (see Tool Box). The robot recieve commands from the command line, and gives you information from the data and status line.
I was assigned to create a program which operates the robot to do the following things:
1) Do what human want. (move forward, turn right/left, see what is in front of it, switch on/off lamp)
2) Move forward until he hits, analize what it hit and if it's a lamp in turn it on, then turns randomly right or left tries to move forward again and continues this loop. (I've put a limit of 50 loops)
3) The robot have to find all close lamps in a map and turn them on, all by it self.
After some days (3 or 4), I managed to make this program. The first 2 sub programs took me only a day or less, the third took me some time to complete because it is much more difficult that the others too. I managed to solve some of emu 8086's bugs delayed me. The program took me about 850 lines but works perfectly. I haven't found (yet) any kind of bug in my program.
Εγγραφή σε:
Σχόλια ανάρτησης (Atom)
Δεν υπάρχουν σχόλια:
Δημοσίευση σχολίου