This is an old revision of the document!
The following guide describes the use of the CodeBlocks environment for programming HomeLab Controller Module. This is based on CodeBlocks enviroment, specially adapted for Homelab with a set of packaged software and accessories. Modified CodeBlocks enviroment are downloadable website: http://home.roboticlab.eu/et/files
To create the new project, select in menu File→New→Project. There should be selected a project template according to HomeLab generation and configure it as desired. When HomeLab project template is used, then the values are already filled, and there is no need to change anything around. The following example dialog boxes are based on the Robotics HomeLab III. After choosing a right version of HomeLab generation then enter the project name and set the location to save the file (it is preferable to avoid the use of umlauts). Then you can set the project compiling folder and in the next window, enter microcontroller parameters.
Kui projekt on loodud, ilmub vasakule projektipuusse uus projekt koos main.c failiga, kus on juba olemas lihtne näitekood. Kompileerimine käib CodeBlocksis tööriistaribal oleva hammasratta ikooniga või klahviga F7. Kui kompileerimine õnnestub kuvatakse all Build Log aknas kasutatud programmimälu maht ning ebaõnnestumise korral veateated.
Programmi peale laadimiseks, tuleb Kodulabor III kontrolleril käivitada buudilaadur hoides all S0 nuppu ja tehes samaaegselt Kontrollermoodulile taaskäivitus reset. Kui süttib sinine LED, siis on Kontrollermoodul valmis uue programmi pealelaadimiseks. Varasemate Kodulaboritega eraldi buudilaaduri režiimi minna pole vaja. Kompileeritud programmi saab kontrollerisse laadida menüüst Tools valides õige Kodulabori programmaatori. Kodulabor III korral on selleks HomeLab III või kiirklahvid CTRL+F7.