top of page

PROGRAMMING EXPLAINED

1
WHAT IS PROGRAMMING?

In the most simplified terms, take programming as the action of writing a series of events that a piece of device(hardware) has to go through or in most cases perform.

Programming is just that. You wake up one day and think of a thing or two. You build up the hardware say an electric spoon that  

That spoon will not function if not programmed, trust me. You shall then design the behavior of your spoon. Like, if it is on, what should it start by doing? Should it light red or green perhaps, should the speakers make some noise or produce an understandable sound. And when we bring all the actions as one, it's a program 

1
DIGGING DEEP IN...

A program is just a set of instructions in a series. They should be in order for everything to work as expected. One mismatch can cost you everything. Just a human, your robot's program has to work hand in hand with the hardware. And here, time is the critical issue. You should know when and why something is happening. There is no accidental programming here, you are the boss.

Basing on this fact, you should then know the steps taken in programming a robot.

1. You design the program.

2. You write bits of the program

3. You test run the bits you've written

4. You arrange the bits according to when, how and why they should run.

5. You download and run the full and complete version of your program.

2
3
PROGRAM DESIGN<ROBOT BASED>

First, know what you are up against. Know you robot's properties like how long, how heavy? Let's say the motors are at their maximum, how fast can it run? You should plan for it and the critical issue here is knowledge of what you are up against. Research should be your hero. Visit google and search. 

After you've known your robot, then go down to paper work. The flow chart int the diagram to the left should give a hint of a flow chart.

Remember, if it's your first time, a simple program design is just fine. It's from that that you shall soon design a complex program.

WRITING BITS OF PROGRAM<CODE BITS>

A code bit is a section of a program written to address a particular program.

Let's take an example of moving robot. You design your program with provisions of move fwd, move back, turn left and turn right.

You choose that bit from your program design  like the bit of move left. 

Then you translate the actions into code and write them in an editor.

Compile and download the code bit.

Then run to see if it works.

This helps in error handling. Atleast if this code bit runs, you can move on to the next and any failures then are easily rectified.

4
5
ASSEMBLING OF CODE BITS

After you have written and tested all the code bits you designed, you just have to assemble them into one complete program.

You should keep this at the back of your mind though: THE CODE BITS SHOULD BE ASSEMBLED TO WORK WHEN THEY ARE SUPPOSED TO! You can not afford code bits to interrupt each other's actions.

To the left is an image of a complete vex program built in robotc.

You should also browse the web for different code examples for some hardware like motors, sensors and the like. 

bottom of page