servo.sweep()
to work once, but it the steps were kind of erratic. And now I can't get the servo to move
Imp.prototype.sendI2CConfig = Imp.prototype.i2cConfig;
servo.sweep()
weirdness https://www.dropbox.com/s/bvbkm8mwfpr085a/servo.mov?dl=0
led.blink()
, so may not be an I2C issue?
@rwaldron There are two things I would like to add to imp-io but they are not things found/done in Firmata. I think they are important given the nature of how the Imp works.
Both of this things are easily done, but for the second I need to add a command. What is the authoritative source for this list and can I add new ones?
const PIN_MODE = 0xF4;
const ANALOG_WRITE = 0xE0;
const SERVO_WRITE = 0xE1;
const DIGITAL_WRITE = 0x90;
const REPORT_ANALOG = 0xC0;
const REPORT_DIGITAL = 0xD0;
const I2C_REQUEST = 0x76;
const I2C_REPLY = 0x77;
const I2C_CONFIG = 0x78;
const SYSTEM_RESET = 0xFF;
HCSR04
with a electric imp?TypeError: this.io.pingRead is not a function
'use strict';
const five = require("johnny-five");
const Imp = require("imp-io");
const board = new five.Board({
io: new Imp({
agent: process.env.IMP_AGENT_ID
})
});
board.on("ready", function() {
let proximity = new five.Proximity({
controller: "HCSR04",
pin: 7
});
proximity.on("data", function() {
console.log("Proximity: ");
console.log(" cm : ", this.cm);
console.log(" in : ", this.in);
console.log("-----------------");
});
proximity.on("change", function() {
console.log("The obstruction has moved.");
});
});