“Hey, Chapter numbers are in binary!” could you say. And, yes, they are! And they are bytes. And we can have maximum number of 255. Will we go so far? Who knows… But let’s return to the topic of the chapter. The place where programs are “made”: the IDE. It stands for Integrated Development Environment. Why integrated? Because it usually consists of few modules which work together. The basic modules of an IDE are:
- Code editor. You write program code in there.
- Compiler. It translates the program from high level language to chip’s native language.
- Debugger. Allows you to troubleshoot your programs by looking “inside” them in time of execution. We will cover debugging in a separate chapter.
The IDEs we will use:
Platform | IDE name | Where can I get one? |
Picaxe® | Picaxe Programming Editor | |
Arduino® | Arduino IDE |
Both of them are free and easy to use. Let’s have a look on main window of each one.
Picaxe® programming editor:
Arduino IDE:
All IDEs have many things in common. At this point the most important for us are:
1. Code editor. You type in the program code in there. Most of code editors have “color syntax” feature. It makes reading the code easier. There are also some unwritten rules for coding which I will try to cover in later chapters.
2. Syntax verification. This feature allows checking the syntactic correctness. That means that program can be successfully compiled. Now, be careful here:
Successful syntax check does not mean that the program will work as desired. It is not a logic check.
3. Programs upload mechanism. This compiles the program and uploads code into microcontroller. For program upload you have to physically connect your computer and microcontroller. This is done via:
- Picaxe® serial cable AXE026 or USB programming cable AXE027.
- Standard B USB cable for Arduino (may vary across different clones and boards types).
And of course there are “New”, “Open” and “Save” commands.
That is it for now. We are going to write our first program and upload it into microcontroller in the next chapter.
See other chapters of this series here.