# pi-tft24
# PiTFT24 ⇒ JsCadUtilsGroup
Returns an Adafruit PiTFT 2.4 Hat with buttons.
Returns: JsCadUtilsGroup
- A group object with all of the parts for a PiTFT24.
export default function PiTFT24(options = {}, pi) {
Param | Type | Default | Description |
---|---|---|---|
[options] | Object | An options object. | |
[options.buttonCapHeight] | number | 4 | The button cap height. |
[options.capBaseHeight] | number | 1 | The base of the button cap height. |
[options.buttonWireYOffset] | number | 5 | The offset of the wire connecting the buttons. |
[options.clearance] | number | 0.9 | The clearance between the buttons and their holes. |
[pi] | CSG | A RaspberryPi CSG object to align the PiTFT24 object to. |
Example
function main() {
util.init(CSG);
var pi = RaspberryPi.BPlus().align('mb', util.unitCube(), 'xy');
pi.add(RaspberryPi.Spacer({}, pi.parts.mb), 'spacer');
pi.add(
RaspberryPi.PiTFT24({}, pi.parts.mb).snap(
'mb',
pi.parts.spacer,
'z',
'outside-'
),
'screen'
);
return pi.combineAll();
}
// include:js
// endinject