The DAISY-5 is a keypad module with eight buttons. It is part of the modular Daisy System that can be controlled by the FOX Board G20 via the DAISY-1 Adapter, or by the Terra Board.
Each button is wired directly on a single GPIO line. Under normal conditions, the GPIO line is pulled down (logic 0) through a 10 KΩ resistor. Pressing the button closes the GPIO line to +3.3V (logic 1) by a 1.5 KΩ resistor.
The Daisy ports that can be used are:
Be sure to get a 0.05" pitch 2x5 IDC cable (FC-19818-10P-FF) to make the connection. The cable is not included.
- D2 or D5 on the DAISY-1 adapter
- D11 or D12 on the Terra Board
If you have the obsolete BeeBoard, you can connect this module to ports W3 or W4. Note that the BeeBoard's I2C is disabled when the module is on W4.
DAISY-5 Programming Examples These Python code examples run on the Terra Board with this module plugged into D11. Some examples also require the DAISY-11 LED board, plugged into Terra's D12. You can modify the source code easily to run it on the Fox Board, e.g. with DAISY-5 on D5 and DAISY-11 on D2.
The examples call the ablib Library.
- read.py displays a message on the console when any button is pressed.
- pb2led.py turns on DAISY-11 LED L1 when DAISY-5 button P1 is pressed.
- presstolight.py polls all buttons and lights the corresponding LED on the DAISY-11.
Interrupt Examples Those simple polling examples all put the CPU in a never-ending loop. These interrupt examples provide a non-locking method using the epoll Linux function, multithread capability and callback function registration. These examples only work fully on the Terra Board, as the Fox Board only supports the both edge condition; the rising and falling edge conditions are supported only by the Terra Board.
- edge.py displays a message on the console when P1 is pressed, while a counter also runs on the console.
- multiedge.py displays a message on the console when P1 pressed, when P2 is released, and when P3's state changes, all while a counter also runs on the console.
Daisy System Button Module Resources
Optional Recommended Products for this Item