Skip to content

Commit

Permalink
Rebuild Example programs
Browse files Browse the repository at this point in the history
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
  • Loading branch information
rwaldron committed May 14, 2012
1 parent 7f55801 commit e3b12f3
Show file tree
Hide file tree
Showing 73 changed files with 269 additions and 144 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -90,6 +90,7 @@ board.on("ready", function() {
- [Sensor Slider](https://github.com/rwldrn/johnny-five/blob/master/docs/sensor-slider.md)
- [Sensor](https://github.com/rwldrn/johnny-five/blob/master/docs/sensor.md)
- [Servo Array](https://github.com/rwldrn/johnny-five/blob/master/docs/servo-array.md)
- [Servo Digital](https://github.com/rwldrn/johnny-five/blob/master/docs/servo-digital.md)
- [Servo Dual](https://github.com/rwldrn/johnny-five/blob/master/docs/servo-dual.md)
- [Servo](https://github.com/rwldrn/johnny-five/blob/master/docs/servo.md)
- [Slider Pan](https://github.com/rwldrn/johnny-five/blob/master/docs/slider-pan.md)
Expand Down
8 changes: 4 additions & 4 deletions docs/accelerometer-pan-tilt.md
Expand Up @@ -4,7 +4,7 @@
var five = require("johnny-five"),
board;

board = five.Board();
board = new five.Board();

board.on("ready", function() {

Expand All @@ -13,19 +13,19 @@ board.on("ready", function() {
range = [ 0, 170 ];

// Servo to control panning
pan = five.Servo({
pan = new five.Servo({
pin: 9,
range: range
});

// Servo to control tilt
tilt = five.Servo({
tilt = new five.Servo({
pin: 10,
range: range
});

// Accelerometer to control pan/tilt
accel = five.Accelerometer({
accel = new five.Accelerometer({
pins: [ "A3", "A4", "A5" ],
freq: 250
});
Expand Down
6 changes: 4 additions & 2 deletions docs/accelerometer.md
Expand Up @@ -4,7 +4,7 @@
var five = require("johnny-five"),
board, accel;

board = five.Board();
board = new five.Board();

board.on("ready", function() {

Expand All @@ -18,7 +18,7 @@ board.on("ready", function() {
// });
//

accel = five.Accelerometer({
accel = new five.Accelerometer({
pins: [ "A3", "A4", "A5" ],
freq: 100
});
Expand Down Expand Up @@ -49,7 +49,9 @@ board.on("ready", function() {

## Breadboard

<img src="https://raw.github.com/rwldrn/johnny-five/master/docs/breadboard/accelerometer.png">

[accelerometer.fzz](https://github.com/rwldrn/johnny-five/blob/master/docs/breadboard/accelerometer.fzz)


## Documentation
Expand Down
2 changes: 1 addition & 1 deletion docs/board.md
Expand Up @@ -4,7 +4,7 @@
var five = require("johnny-five"),
board;

board = five.Board();
board = new five.Board();

// The board's pins will not be accessible until
// the board has reported that it is ready
Expand Down
Binary file added docs/breadboard/accelerometer.fzz
Binary file not shown.
Binary file added docs/breadboard/accelerometer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/breadboard/ping.fzz
Binary file not shown.
Binary file modified docs/breadboard/ping.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/breadboard/potentiometer.fzz
Binary file not shown.
Binary file added docs/breadboard/potentiometer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/breadboard/servo-digital.fzz
Binary file not shown.
Binary file added docs/breadboard/servo-digital.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/breadboard/sonar.fzz
Binary file not shown.
Binary file added docs/breadboard/sonar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/button-options.md
Expand Up @@ -4,12 +4,12 @@
var five = require("johnny-five"),
board, button;

board = five.Board();
board = new five.Board();

board.on("ready", function() {

// Create a new `button` hardware instance
button = five.Button({
button = new five.Button({
board: board,
pin: 7,
holdtime: 1000
Expand Down
4 changes: 2 additions & 2 deletions docs/button.md
Expand Up @@ -4,14 +4,14 @@
var five = require("johnny-five"),
board, button;

board = five.Board();
board = new five.Board();

board.on("ready", function() {

// Create a new `button` hardware instance.
// This example allows the button module to
// create a completely default instance
button = five.Button(7);
button = new five.Button(7);

// Inject the `button` hardware into
// the Repl instance's context;
Expand Down
4 changes: 2 additions & 2 deletions docs/claw.md
Expand Up @@ -4,11 +4,11 @@
var five = require("johnny-five"),
board;

board = five.Board();
board = new five.Board();

board.on("ready", function() {

var claw = five.Servo({ pin: 9 }),
var claw = new five.Servo({ pin: 9 }),
arm = five.Servo({ pin: 10 }),
degrees = 10,
incrementer = 10,
Expand Down
4 changes: 2 additions & 2 deletions docs/continuous.md
Expand Up @@ -4,12 +4,12 @@
var five = require("johnny-five"),
board, servo;

board = five.Board();
board = new five.Board();

board.on("ready", function() {

// Create a new `servo` hardware instance.
servo = five.Servo({
servo = new five.Servo({
pin: 9,
// `type` defaults to standard servo.
// For continuous rotation servos, override the default
Expand Down
6 changes: 3 additions & 3 deletions docs/joystick-claw.md
Expand Up @@ -4,15 +4,15 @@
var five = require("johnny-five"),
board, claw, joystick;

board = five.Board();
board = new five.Board();

board.on("ready", function() {

var claw = five.Servo({
var claw = new five.Servo({
pin: 9,
range: [ 0, 170 ]
}),
joystick = five.Joystick({
joystick = new five.Joystick({
pins: [ "A0", "A1" ],
freq: 250
});
Expand Down
8 changes: 4 additions & 4 deletions docs/joystick-laser.md
Expand Up @@ -2,7 +2,7 @@

```javascript
var five = require("johnny-five"),
board = five.Board({
board = new five.Board({
debug: true
});

Expand All @@ -12,21 +12,21 @@ board.on("ready", function() {
range = [ 0, 170 ];

// Servo to control panning
pan = five.Servo({
pan = new five.Servo({
pin: 9,
range: range
});

// Servo to control tilt
tilt = five.Servo({
tilt = new five.Servo({
pin: 10,
range: range
});

// Joystick to control pan/tilt
// Read Analog 0, 1
// Limit events to every 50ms
joystick = five.Joystick({
joystick = new five.Joystick({
pins: [ "A0", "A1" ],
freq: 100
});
Expand Down
8 changes: 4 additions & 4 deletions docs/joystick-motor-led.md
Expand Up @@ -4,12 +4,12 @@
var five = require("johnny-five"),
board, joystick, motor, led;

board = five.Board();
board = new five.Board();

board.on("ready", function() {

// Create a new `joystick` hardware instance.
joystick = five.Joystick({
joystick = new five.Joystick({
// Joystick pins are an array of pins
// Pin orders:
// [ up, down, left, right ]
Expand All @@ -19,12 +19,12 @@ board.on("ready", function() {
});

// Attach a motor to PWM pin 5
motor = five.Motor({
motor = new five.Motor({
pin: 5
});

// Attach a led to PWM pin 9
led = five.Led({
led = new five.Led({
pin: 9
});

Expand Down
4 changes: 2 additions & 2 deletions docs/joystick.md
Expand Up @@ -4,12 +4,12 @@
var five = require("johnny-five"),
board, joystick;

board = five.Board();
board = new five.Board();

board.on("ready", function() {

// Create a new `joystick` hardware instance.
joystick = five.Joystick({
joystick = new five.Joystick({
// Joystick pins are an array of pins
// Pin orders:
// [ up, down, left, right ]
Expand Down
4 changes: 2 additions & 2 deletions docs/led-fade.md
Expand Up @@ -4,12 +4,12 @@
var five = require("johnny-five"),
board, led;

board = five.Board();
board = new five.Board();

board.on("ready", function() {

// Create a standard `led` hardware instance
led = five.Led({
led = new five.Led({
// Use PWM pin 9 for fading example
pin: 9
});
Expand Down
4 changes: 2 additions & 2 deletions docs/led-on-off.md
Expand Up @@ -4,12 +4,12 @@
var five = require("johnny-five"),
board, led;

board = five.Board();
board = new five.Board();

board.on("ready", function() {

// Create a standard `led` hardware instance
led = five.Led({
led = new five.Led({
pin: 13
});

Expand Down
4 changes: 2 additions & 2 deletions docs/led-pulse.md
Expand Up @@ -4,12 +4,12 @@
var five = require("johnny-five"),
board, led;

board = five.Board();
board = new five.Board();

board.on("ready", function() {

// Create a standard `led` hardware instance
led = five.Led({
led = new five.Led({
// Use PWM pin 9 for fading example
pin: 9
});
Expand Down
10 changes: 5 additions & 5 deletions docs/led-rgb.md
Expand Up @@ -4,15 +4,15 @@
var five = require("johnny-five"),
board, red, green, blue, leds;

board = five.Board();
board = new five.Board();

board.on("ready", function() {

red = five.Led(9);
green = five.Led(10);
blue = five.Led(11);
red = new five.Led(9);
green = new five.Led(10);
blue = new five.Led(11);

leds = five.Leds();
leds = new five.Leds();


// leds.pulse( 5000 );
Expand Down
4 changes: 2 additions & 2 deletions docs/led-strobe.md
Expand Up @@ -4,12 +4,12 @@
var five = require("johnny-five"),
board, led;

board = five.Board();
board = new five.Board();

board.on("ready", function() {

// Create a standard `led` hardware instance
led = five.Led({
led = new five.Led({
pin: 13
});

Expand Down
6 changes: 3 additions & 3 deletions docs/motor.md
Expand Up @@ -4,17 +4,17 @@
var five = require("johnny-five"),
board, motor, led;

board = five.Board();
board = new five.Board();

board.on("ready", function() {
var timer;

// Create a new `motor` hardware instance.
motor = five.Motor({
motor = new five.Motor({
pin: 5
});

(led = five.Led()).on();
(led = new five.Led()).on();

// Inject the `motor` hardware into
// the Repl instance's context;
Expand Down
2 changes: 1 addition & 1 deletion docs/ping.md
Expand Up @@ -4,7 +4,7 @@
var five = require("johnny-five"),
board, ping;

board = five.Board();
board = new five.Board();

board.on("ready", function() {

Expand Down
4 changes: 2 additions & 2 deletions docs/pir.md
Expand Up @@ -4,12 +4,12 @@
var five = require("johnny-five"),
board, pir;

board = five.Board();
board = new five.Board();

board.on("ready", function() {

// Create a new `pir` hardware instance.
pir = five.Pir({
pir = new five.Pir({
pin: 7
});

Expand Down
6 changes: 4 additions & 2 deletions docs/potentiometer.md
Expand Up @@ -4,12 +4,12 @@
var five = require("johnny-five"),
board, potentiometer;

board = five.Board();
board = new five.Board();

board.on("ready", function() {

// Create a new `potentiometer` hardware instance.
potentiometer = five.Sensor({
potentiometer = new five.Sensor({
pin: "A2",
freq: 250
});
Expand All @@ -36,7 +36,9 @@ board.on("ready", function() {

## Breadboard

<img src="https://raw.github.com/rwldrn/johnny-five/master/docs/breadboard/potentiometer.png">

[potentiometer.fzz](https://github.com/rwldrn/johnny-five/blob/master/docs/breadboard/potentiometer.fzz)


## Documentation
Expand Down
2 changes: 1 addition & 1 deletion docs/repl.md
Expand Up @@ -4,7 +4,7 @@
var five = require("johnny-five"),
board;

board = five.Board();
board = new five.Board();

board.on("ready", function() {
console.log( "Ready event. Repl instance auto-initialized" );
Expand Down

0 comments on commit e3b12f3

Please sign in to comment.