(opens new window) (opens new window)
# jscad-raspberrypi
This is a collection of jscad parts that model a RaspberryPi BPlus and various Hats. These models use the jscad-utils (opens new window) library and return jscad-utils group
objects (opens new window).
# 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');
include('node_modules/lodash/lodash.js');
main() {
util.init(CSG);
var BPlus = RaspberryPi.BPlus();
return BPlus.combine();
}
# Yeoman Generator
You can use the yeoman jscad generator (opens new window) which will create a project that uses this library.
Once you create your project, install jscad-raspberrypi
, and run gulp
. Dragging the dist
directory into http://openjscad.org/ (opens new window) will include this library.
Modify your main.jscad
file to return a RaspberryPi object.
// include:js
// endinject
/* exported main, getParameterDefinitions */
/* globals piexample */
function main(params) {
util.init(CSG);
return RaspberryPi.BPlus().combine();
}
# Examples
Examples are placed in the dist
directory. This allows the files to be included directly into openjscad.org.
Here are some of the examples:
- example (opens new window) an example showing how to combine several parts.
- bplus (opens new window) an example bplus board.
- bplus3 (opens new window) an example bplus modle 3 board.
- camera-module-v1 (opens new window) an example camera module version 1.
- camera-module-v2 (opens new window) an example camera module version 2.
- hat-standoff (opens new window) an example standoff.
- hat (opens new window) an example hat.
- pi-tft22 (opens new window) an example Adafruit TFT22.
- pi-tft24 (opens new window) an example Adafruit TFT24.
- spacer (opens new window) an example spacer.
© 2016 John Cole johnwebbcole@gmail.com.