What is an IDE?

An IDE (or Integrated Development Environment) is a program dedicated to software development. As the name implies, IDEs integrate several tools specifically designed for software development. These tools usually include:

  • An editor designed to handle code (with, for example, syntax highlighting and auto-completion)

  • Build, execution, and debugging tools

  • Some form of source control

The Kookaberry has its own Integrated Development Environment (KookaIDE) offering the following features.

  • REPL :  single line execution of MicroPython code

  • EDITOR: writing of MicroPython programs as well as program editing

  • RUN:  a facility to run a program directly on the Kookaberry

  • LOAD : a facility that allows the loading of stored programs into the Editor

  • SAVE: a facility that allows programs developed or modified in the Editor to be stored (saved)

  • TEACHER'S WINDOW: a training and teaching facility that allows the Kookaberry display to be mirrored onto a connected computer via a separate window

The latest version of the KookaIDE is held in a github repository within separate KookaSuite executable programmes for both Windows and Mac computers


The KookaIDE Window

Getting Started

First you must have KookaSuite installed on your computer. If not already installed, follow the link to the appropriate Tutorial.

Installing Kookasuite on a PC →

Installing Kookasuite on a Mac→

To run KookaIDE, find and run the KookaIDE.exe app in the KookaIDE folder (Local Disc> Program Files> Kookaberry> KookaIDE) or from a shortcut.


Running the IDE

If the KookaIDE is running without a Kookaberry or Pico connected a message will appear in the lefthand pane (the REPL window) "Waiting for Kookaberry....."

When a Kookaberry is connected to the computer an additional message will appear in the REPL window telling you the version of MicroPython that is being used and the date and version of the last firmware upgrade of the processor chip.

The flashing >>> shows that it is waiting for instructions.


Panes in the IDE Window


The left hand pane is the REPL. This stands for Read, Evaluate, Print, Loop and is a feature of many Python or MicroPython IDE's. It allows for single line execution of MicroPython instructions.

The right hand pane is the MicroPython Editor where programs are written or modified.

Scripts Menu

There are two Scripts menus in the top right of screen. These allow access to pre-loaded programmes which are loaded into the KookaScripts folder.

The example shown is for the Demos folder chosen in Scripts menu and the Analogue.py script (programme) chose in the other.


Script Control Buttons


The seven buttons along the top of the REPL pane have the following functions. NOTE: KookaBlockly script files have a type designation of .kby.py.

New: Empties the workspace to start a new script. If the current script contents have not been saved then a save prompt is give

Load: Allows the user to select a KookaBlockly program to be loaded into the Workspace, appending it to the current script. This feature enables the assembling of scripts by combining separate script files.

Save: Will save the edited programme in the folder from which it was loaded.

Save As:Will save the edited programme in a folder of your choice. Tip: Create a "My Programmes" folder in the KookaIDE sub-folder of the KookaScripts folder. This will allow you to access your saved programmes through the Script menus buttons.

Run: Will run the programme in the Editor pane on the tethered Kookaberry or Pico

Stop: Will stop a programme running in the Editor pane.

At Start Up Button


The Start Up button provides the option to automatically run a script automatically whenever a connected compatible SBC (Single Board Computer) is turned on or reset.

The SBC will look for a script file called main.py in the root folder of its file store whenever it starts up. If the script is present, it will be run. Using the At Start Up button, a file called main.py is created containing a small script that causes a designated script in the Kookaberry’s app folder to be run.

For this to work correctly, the script must first be stored on the Kookaberry’s file storage system, in the app folder.

Click on the At Start Up button and a dialogue window, shown to the left will appear with a drop-down list of the scripts stored on the SBC.

The first entry will be <none> followed by a list of scripts in the app folder. Select the desired script and click the OK button.

A norla folder dialogue window will then open to select where on the Kookaberry a script file called main.py should be stored. Usually this will be in the root folder of the Kookaberry’s file store. However on occasion you may want to store the main.py file elsewhere. Select the folder and click on the OK button and the main.py file will be stored in the folder.

To stop the script from being automatically run, select <none> in the script selection dialogue and overwrite the previously stored main.py. A main.py file will still exist but without any instructions to start a script.

Other Buttons

The two Zoom In and Zoom Out buttons increase and decrease the text size in both panes

The Serial menu indicates the connection status of the serial port to which the Kookaberry is connected. When the IDE is waiting for connection its status "Auto-connect" and when connected, it shows the COM Port number

The Show Display button toggles (ie turns on and off) the Teachers' Window which mirrors what is being displayed on the tethered Kookaberry


REPL Pane Help Command


Typing help() after the flashing cursor will reveal a list of useful command functions that can be initiated from the REPL pane.

It also identifies port pin names and connector pin names

Other REPL Commands

>>>import kooka This imports a module - in this case the kooka module

>>>import kooka followed on the next line by >>>dir(kooka) expands the kooka module to list all its component functions.

>>> help('modules') lists the MicroPython modules written for KookaBlockly.


Editor Pane Commands


The Editor defaults to black on white text but colours some text with special meanings.

In MicroPython code, keywords, builtin class and function names are highlighted in light blue.

Text is highlighted in magenta and arguments in green.

There are no >>> prompts in the Editor.

Functions available in the Editor are:

  • TAB indents the cursor by 4 spaces

  • Backspace deletes typed character or moves line backwards