Showing posts with label Program. Show all posts
Showing posts with label Program. Show all posts

Monday, May 2, 2016

Arduino Robot Part 1: Wall Follower

Hey guys! It's been a really long while since my last post. And trust me, a lot has happened. Well, as promised, this is the "making" of our 'bot. It's a partial requirement for the subject Embedded Systems. 

The subject mainly focused on Arduino, which is an open source microcontroller. The first project was kind of a Maze Solver type robot, in which the robot needs to find it's way out of a maze. While searching for possible inspirations, I came across this little robot called a 'micromouse', which does the same thing, only better. The micromouse maps the maze until it reaches it's end point, which is usually the center of the maze. It then goes back to the starting point, and finds the shortest path to the center. The process of using the shortened path from the starting point to the center takes more or less 5 seconds. My jaw just dropped and I spent the next seconds pulling it back up. But that's a different story. The micromouse is a special robot. It uses complex algorithms to solve the maze.

I thought we didn't have enough time to study the algorithms and figure it out. So we just resorted to the wall follower algorithm, which is really really simple. It follows either the right wall, or the left wall. In real life, if you raise one of your arms: the left or the right, and touch a wall, eventually you will reach the end. That's the process of this algorithm, hence the name.

Thursday, May 22, 2014

Matlab Codes for Numerical Methods.

Hey guys! So I mentioned earlier that I will share the algorithms I programmed. The night before the deadline of checking, some of my friends came over to my house. But before that, we were working on a Fixed Point Iteration code in the afternoon when manong (term used to refer to a male that is older than you, manang for a female.) Karlo asked me to try a code for HIM (get it. lol) In there, it says the we must use an "inline" function. We didn't know both what it was so I searched it over the internets. Turns out it is one of the key in programming these solutions. The other one is the eval() function. I learned that while doing a False Position code.

(I apologize for the code. I couldn't use the blockquote tag because I can't get it to look right.)