Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

led corrections for chaos hardware

  • Loading branch information...
commit 14144f08f27fcab960a7952e6a662c631b9893a0 1 parent a0a01be
@astro astro authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 node_lib/buzz.js
View
11 node_lib/buzz.js
@@ -38,6 +38,17 @@ Buzz.prototype = new events.EventEmitter();
// - led: the led of the player [0-1]
// - brightness the brightness of the led [0-1]
Buzz.prototype.set_led = function (player, brightness) {
+ if (brightness)
+ brightness = 0;
+ else
+ brightness = 1;
+ // die Ansteuerung funktioniert, aber bei buzzer B und C sind die
+ // led pins (in der firmware) vertauscht. d.h. keyB hat ledC und
+ // keyC hat ledB.
+ if (player === 1)
+ player = 2;
+ else if (player === 2)
+ player = 1;
// there is only one in the hardware
var led = 1;
Please sign in to comment.
Something went wrong with that request. Please try again.