An app for the Kookaberry
This senses the level of the ambient light and, if too dark, switches on a light (LED).
Directions
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?
- Top Row: Name of app
- 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.
- Third Row: Prompts for which connector to use for each sensor. P4 for the ambient light sensor and P2 for the LED
- 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.
- 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.]
- Logging of light level starts as soon as the app is switched on; and off when it is exited
- 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.
- The Kooklog Excel file in the USB drive store can be uploaded to a PC for analysis
Open Questions
- The ambient light sensor and the LED are opposites of each – Why?
Algorithm
Peripherals used by this app
Learning plans that use this app
Version:
Last Updated:
Device:
Radio code:
App ID:
lib_dependencies:
root_dependencies: