![npm module downloads](http://img.shields.io/npm/dt/jscad-raspberrypi.svg)
jscad-raspberrypi
![bplus example](https://github.com/johnwebbcole/jscad-raspberrypi/raw/HEAD/jsdoc2md/bplus.png)
This is a collection of jscad parts that model a RaspberryPi BPlus and various Hats. These models use the jscad-utils library and return jscad-utils group
objects.
Installation
Install jscad-raspberrypi
using NPM:
npm install --save jscad-raspberrypi
Basic usage
To use the utilities, you need to include the jscad-raspberrypi.jscad
file and a copy of lodash
.
include('node_modules/jscad-utils/jscad-utils.jscad');
include('node_modules/jscad-raspberrypi/jscad-raspberrypi.jscad');
main() {
util.init(CSG);
var BPlus = RaspberryPi.BPlus();
return BPlus.combine();
}
Yeoman Generator
You can use the yeoman jscad generator which will create a project that can use this library.
Once you create your project, install jscad-raspberrypi
, and run gulp
. Dragging the file in the dist
directory into http://openjscad.org/ will include this library.
npm install --save jscad-raspberrypi
Modify your main.jscad
file to return a RaspberryPi object.
function main(params) {
util.init(CSG);
return RaspberryPi.BPlus().combine();
}
Reference
RaspberryPi
RaspberryPi.BPlus()
Returns a complete RaspberryPi B Plus model. ![bplus example](https://github.com/johnwebbcole/jscad-raspberrypi/raw/HEAD/jsdoc2md/bplus.png)
Kind: static method of [RaspberryPi](#module_RaspberryPi)
RaspberryPi.Hat()
Returns an empty Pi Hat. ![hat example](https://github.com/johnwebbcole/jscad-raspberrypi/raw/HEAD/jsdoc2md/hat.gif)
Kind: static method of [RaspberryPi](#module_RaspberryPi)
RaspberryPi.PiTFT24()
Returns an Adafruit PiTFT 2.4 Hat with buttons. ![PiTFT 2.4 example](https://github.com/johnwebbcole/jscad-raspberrypi/raw/HEAD/jsdoc2md/pitft24.png)
Kind: static method of [RaspberryPi](#module_RaspberryPi)
RaspberryPi.CameraModule()
Returns an Pi camera module. ![camera example](https://github.com/johnwebbcole/jscad-raspberrypi/raw/HEAD/jsdoc2md/camera.png)
Kind: static method of [RaspberryPi](#module_RaspberryPi)
© 2016 John Cole johnwebbcole@gmail.com. Documented by jsdoc-to-markdown.