This Tutorial describes how to manage the files and folders in the Kookaberry’s USB memory.
This memory on the Kookaberry is a serial memory chip capable of storing 4 Megabytes of information. The number of bits it is capable of storing is actually 32 Megabits as there are 8 bits in a byte. It is the little chip just above P4 on the back of the board.
It is organised and works exactly the same as a USB flash drive and is used for both storing the MicroPython source code files and the .csv files containing the data logged by the Kookaberry when in data logging mode.
MicroPython scripts (source code) is loaded as small Python text files (name.py) onto the memory by a simple drag and drop operation when the Kookaberry is mounted as a USB drive on a computer.
The files and folders loaded into the Kookaberry prior to delivery can be downloaded from the online version of this Tutorial.
The USB memory contains three folders which store various categories of files as described below. It also contains two text files that are used for general administration.
This folder contains all the apps that are to appear in the menu on the screen when the Kookaberry is switched on. The “>” or “/” before a folder name shows that it is a file folder one level down from the general (root) level of the drive.
This folder contains collections of routine, pre-coded, library programmes (scripts) that are accessed by many apps. [Note: App programmes contain code that is particular to the app itself]
Note that these files have the form *.mpy. They are still Python scripts but have been compressed to take up less memory space. Unlike *.py files (which are pure text files), they cannot be viewed in a normal text editor.
This folder contains the programmes which turn the Excel CSV files created during the data logging process into graphs which can be viewed in the web browser of a PC or Mac.
This is the general level of the drive and is where data and plain text files are stored. This is where the Kappconfig .txt and Ktime.txt files are located.
The Kappconfig file stores very general data used across all functions such as name; and Ktime, as its name implies, stores time data.
Files created by Kookaberry apps will also be stored here from where they can be retrieved when connected to a computer. These include
- The Kookapp.cfg file which contains a simple ID; the radio channel number; and the data logging interval. These variables are set from the _config app which is always at the top of the Menu.
- CSV (Excel) files containing the data measured during data logging activities (eg, count data from the CountMe app)
- Html files containing the information needed to plot CSV data onto graphs in a web browser
NOTE: Files generated by Kookaberry apps will not appear in the computer’s USB drive file directory until after the Kookaberry receiving the data exits the app and until after the Kookaberry has been reset.
This process happens automatically when switching from battery to USB power
Kookaberries are supplied with the USB memory populated with a basic set of Apps and all current lib and c3d3 files.
It is good practice to connect the Kookaberry (when first received) to a computer; make a copy of the USB memory drive; and paste it to another place in the computer where it can be copied or retrieved as required.
To do this,
- right-click the Drive (usually KOOKABERRY (D))
- click Copy
- Paste in a new safe location – preferably where they are backed up in the cloud eg, on OneDrive or a Google Drive
This new location should be the one into which all new files and revised versions of existing software should be loaded pending their transfer by drag-and-drop into the USB memories of connected Kookaberries.
If the USB memory on a Kookaberry becomes corrupted for some reason (ie, the menu screen starts looking strange) then the drive should be formatted (ie cleaned out completely), and the folders and files copied and pasted back from the backup location
Corruption of the USB memory – which is exceedingly rare – generally occurs because the USB cable is disconnected when data is being transferred.
This can be avoided by either closing the Kookaberry drive before disconnecting, or checking that it is OK to eject the USB memory by clicking the little USB memory icon at the right of Taskbar at the bottom of your Windows computer.
To format the Kookaberry drive, right click on the drive name in the browser menu (left hand screenshot below), and then click on Format . The window in the right hand screenshot will appear.
Click Start and a warning will appear. Click OK
The formatting will proceed and a popup window will advise that the operation has been completed. Close the Format window.
The Kookberry (D) drive will now be empty.
Copy all the original files, plus all new or updated ones from the backed up location on your computer and paste them into the empty Kookaberry drive.
The Kookaberry will now work as well as it when you took it out of its original box