This uses a five-button keyboard as a totalisator to generate the number of items counted in each of five categories. The resulting data from individually identified Kookaberries is then broadcast to the teacher’s Kookaberry for uploading to a computer for analysis and display.
Step 1: Setup
Set up the app by plugging the Keyboard into P4. The keyboard has 5 coloured keys: Y G B R W. Each key, when depressed sends a unique analogue voltage to P4.
Step 2: Running the app
Navigate to the CountMe app and press Button B to run. Press Button C to restore a clear count on the screen (all zeros)
What is showing on the screen?
- Top: The name of the app with a prompt to plug the keyboard into P4.
- Middle: The first letter of the button colour and a count of the number of times it has been pressed
- Bottom: Button A is Exit from app; Button C is reset; Button D is pause; and Button B is save.
Step 3: Using the app
Operate the keys in accordance with the lesson plan. Press Button D to pause and restore counting [pressing keys will not result in a count during Pause period].
Press Button B to save the total count to the on-board USB memory as a Kooklog.csv file when finished, and to also broadcast the data to the teacher’s Kookaberry running the ListenLog app.
- Import initial conditions from the Kappconfig.txt file via the Kapputils.py file
- Create the analog input for the keypad and turn off radio to conserve power
- Read the keyboard and identify individual key presses
- Identify Reset and Pause commands
- Total the key presses for each key during the counting period
- Write the total counts for each key to the Kooklog.csv file.
- Broadcast the total counts for each key over a radio channel.