Closed MBWhitestone closed 7 years ago
can you establish connection? my drone "eyes" stop blinking when connected? do you use an internal bluetooth 4.0 or is it some kind of usb dongle?
Yes I can establish a connection. I use an internal bluetooth 4.2 adapter. The eyes of the drone don't blink and are green when connected. (I even managed to fly the drone using another NodeJS package as I stated, so it can hardly be a hardware issue.)
Hey MBWhitestone,
Can you try shutting down the drone, restarting it and then running the code? I've noticed sometimes the drone itself just rejects all the connection requests until we restart it.
I have done that several times, however it unfortunately does not help. :(
Can you share ur code so I can check it out what's wrong?
var minidrone = require('dronejs');
var navDataStream = minidrone.getNavDataStream();
navDataStream.subscribe((data) => {
console.log(data);
},
err => debug(err),
() => debug('complete'));
minidrone.connect('RS_') // Also tried RS_R######
.then(() => minidrone.flatTrim())
.then(() => minidrone.takeOff())
.then(() => minidrone.flatTrim())
.then(() => minidrone.takePicture())
.then(() => minidrone.flatTrim())
.then(() => minidrone.land())
.then()
.catch((e) => {
console.log('Error occurred: ' + e);
});```
I just added a feature of logging to help me fix the issues.
Can u update the library and try running the example "check-all-states.js" after turning on logging. Post all the logs here so I can check out your problem.
minidrone.logging(true);
Plz refer API for more details: https://github.com/gandhimonik/DroneJS#api`
Sorry, this is the example I am talking about.
Dear Gandhimonik,
Sorry for my late reaction. For the continuation of the project we switched to another drone. Unfortunately, I have no longer access to the Rolling Spider, so I am not able to try your logfeature. Nevertheless, I thank you for your kind support.
Dear Gandhimonik,
I would really like to use your code for an educational project. However when executing some examplecode like:
`var minidrone = require('dronejs');
var navDataStream = minidrone.getNavDataStream(); navDataStream.subscribe((data) => { console.log(data); }, err => debug(err), () => debug('complete'));
minidrone.connect('RS_') .then(() => minidrone.flatTrim()) .then(() => minidrone.takeOff()) .then(() => minidrone.flatTrim()) .then(() => minidrone.takePicture()) .then(() => minidrone.flatTrim()) .then(() => minidrone.land()) .then() .catch((e) => { console.log('Error occurred: ' + e); });`
the drone (Rolling Spider) does not give any reaction. I do not get any error messages except some noble warning which I also get using the software of node-rollling-spider (https://github.com/voodootikigod/node-rolling-spider) however with that software the drone does react. Changing 'RS_' in the connect statement to the correct bluetoothcode of the drone also does not help. I am currently using:
Have you any idea what I am doing wrong?