Browse Source

es08a: Move servo.js example to use es08a class

Signed-off-by: Sarah Knepper <sarah.knepper@intel.com>
Sarah Knepper 10 years ago
parent
commit
6aef5868af
1 changed files with 2 additions and 4 deletions
  1. 2
    4
      examples/javascript/es08a.js

examples/javascript/servo.js → examples/javascript/es08a.js View File

@@ -28,10 +28,8 @@
28 28
 //Load servo module.
29 29
 var servoModule = require("jsupm_servo");
30 30
 
31
-//Instantiate Servo module on GPIO 5
32
-var servo = new servoModule.Servo(5);
33
-servo.setMinPulseWidth(600);
34
-servo.setMaxPulseWidth(2200);
31
+//Instantiate ES08A Servo module on GPIO 5
32
+var servo = new servoModule.ES08A(5);
35 33
 
36 34
 // function to initialize servo
37 35
     // timeOffset: how long after hitting "run"