An app for the Kookaberry

Developed by
Tony Strasser


This senses the level of the ambient light and, if too dark, switches on a light (LED).


Step 1: Setup

Setup the app by plugging an ambient light sensor into P4 and an LED into P2.

A cardboard house can be constructed, with the sensor mounted on the roof and the LED in a window.


Step 2: Running the app

Navigate to the LightMe app and press Button B to run


What is showing on the screen?

  1. Top Row: Name of app
  2. Second Row: Light icon. Percentage of brightness arbitrarily classified as Dark, Dim, or Bright. “Tank” indicator of level of analogue light signal with two adjustable thresholds for triggering the LED.
  3. Third Row: Prompts for which connector to use for each sensor. P4 for the ambient light sensor and P2 for the LED
  4. Fourth Row: Button A is Exit from app; Button C deceases the two thresholds and Button D raises them
Step 3: Using the app

[The operation of this app is described in detail it our Data Logging Tutorial]

Light level is displayed as a % and arbitrarily categorised as Dark, Dim, or Bright. The LED is switched on when Dark. The sensor has a detection range from 1-6000 Lux.

Examples of light levels: Very Bright Summer Day 100,000 Lux; Full Daylight 10,000 Lux; Overcast Summer Day 1,000 Lux; Very Dark Day 100 Lux; Twilight 10 Lux; Full Moon< 1 Lux

The LED can be turned on and off (simulating day and night) by holding a hand between sensor and light source.

  1. Use buttons C&D to move the light detection threshold up or down to compensate for the ambient light level. There are two thresholds (shown as horizontal bars on the histogram) – one for detecting light level rising and other when it is falling. [If they were the same you would get a rapid light jiggle as the processor is trying to determine whether to turn the light ON or OFF.]
  2. Logging of light level starts as soon as the app is switched on; and off when it is exited
  3. The sampling interval has a default of 2 secs in the Kappconfig.txt file.  For longer sampling period, ie, every 10 seconds, edit the file in the USB memory with any text editor for a duration of 10 seconds.
  4. The Kooklog Excel file in the USB drive store can be uploaded to a PC for analysis

Open Questions

  1. The ambient light sensor and the LED are opposites of each – Why?




Peripherals used by this app

Learning plans that use this app


Last updated:1 week ago


Radio code:

App ID:...



Download on GitHub


Issues resolved in the support forum:

8 out of 11
View support forum

Leave a Reply