Main program flowcharts

The main flowchart of Vertigo. Since Vertigo will independently have to transform itself from the floor to a vertical wall, the main program consists of two mayor algorithms. The first one is used when Vertigo is set on the ground. This algorithms main task is to find the dark metallic wall and place Vertigo perpendicular to it. When transferred, the sensors will detect this and the second algorithms will become active. This algorithm will guide Vertigo passed the white obstacles and govern it to the top, preferable as fast as possible.

Main program

The main program is very short. Its only task is to detect if Vertigo is on the horizontal or the vertical plane, using the different micro switch signals.
When the three micro switches on the bottom of Vertigo are active, the robot is placed against the vertical wall and the 'wall algorithm' needs to be used. If not, Vertigo is still on the floor, and the 'ground algorithm' becomes active.

 

The 'ground algorithm'
The ground algorithm was written to fulfill two tasks. Whatever starting position Vertigo has, the robot must be able to scan the surroundings and find the black metal wall. When the wall is detected, Vertigo is supposed to position himself in such a manner that he can start climbing the wall. This means the algorithm has to place the robot perpendicular to the wall, both wheels touching it. This is the case when all three of the micro switches on the bottom of Vertigo are active and the light sensors do not detect a white object. When these sensors do detect an object, the signal will be processed and Vertigo will activate a subroutine called "Draaien60", which will be discussed later on. This subroutine makes sure that Vertigo backs up and turns about 60 degrees before continuing its search for the black wall. If none of the sensors are active, meaning no object are right in front of Vertigo, our robot will keep on going straight forward.
If one of the micro switches becomes active, without the light sensors detecting an object, Vertigo is in obliquely positioned against the wall. Therefore the wheel that does not touch the wall will be empowered to push Vertigo perpendicular to the wall.

 

The 'wall algorithm'
When all three micro switches on the bottom of Vertigo are active, the software will jump to the 'Wall algorithm'. The main task of this algorithm is to guide Vertigo to the top of the wall, avoiding all contact with the obstacles. The algorithm consist of three subalgorithms (Pot0, Pot90, Pot-90), each of them representing a certain orientation on the wall. The wall algorithm checks the orientation and jumps to the appropriate subalgorithm. The wall algorithm also contains a small piece of code that makes sure that Vertigo will always end up in one of the predefined orientations, even when we place him in an arbitrarily position on the wall.