I am a Senior Frontend Engineer from the ๐ฌ๐ง working at Monzo on the Customer Acquisition team.
mintuz / bb8-commander Goto Github PK
View Code? Open in Web Editor NEWA Node CLI Tool for the Sphero BB8 Robot every loves.
License: MIT License
A Node CLI Tool for the Sphero BB8 Robot every loves.
License: MIT License
I am a Senior Frontend Engineer from the ๐ฌ๐ง working at Monzo on the Customer Acquisition team.
Hey all,
I've noticed the collision detection is hit or miss. I've followed this Issue to tweak the sensitivity, but it is unreliable. I can pick up BB-8 and a collision is detected. But BB-8 can run into a wall and lose its head and no collision detected. Seems that the collision has to be at a certain spot on the ball.
Curious if anyone else has tried to play with collision detection.
Here's my code:
module.exports = function (bb8) {
console.log("Waiting for a collision");
bb8.detectCollisions();
bb8.color("green");
bb8.configureCollisions({
meth: 0x01,
xt: 0x20,
yt: 0x20,
xs: 0x20,
ys: 0x20,
dead: 0x50
});
bb8.on("collision", function(data) {
console.log("collision detected");
console.log(" data:", data);
bb8.color("red");
setTimeout(function() { bb8.color("green"); }, 1000);
});
bb8.roll(200, 0);
}
Send sphero and custom command via json api does not work. Logs show actions name but does not send to BB8
Trying to debug on Eclipse to see which step causes this issue
Any suggestion is appreciated
Thanks
When I do
node index.js disconnect
I get the following
module.js:328
throw err;
^
Error: Cannot find module '/BB8-Commander/commands/./commands/disconnect'
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at /BB8-Commander/libs/execute-command.js:8:7
at /BB8-Commander/node_modules/sphero/lib/sphero.js:130:7
at /BB8-Commander/node_modules/sphero/lib/adaptors/ble.js:316:5
at /BB8-Commander/node_modules/sphero/lib/adaptors/ble.js:168:13
at Characteristic.<anonymous> (/BB8-Commander/node_modules/noble/lib/characteristic.js:91:7)
at Characteristic.g (events.js:260:16)
Hi,
I created a new plugin in order to blink my BB8. You can pass several parameters (color, delay, iterations) and I have a question on how to properly handle the end of my script.
For every existing plugin available here, you have to press ctrl-c to leave the script. I understands that the nature of these plugins is to repeat an action every x seconds and this is to the user to decide to stop it, but in my case and because I will pass the number of times I want my BB8 to blink (parameter "iterations"), what is the best practice to leave the script?
What I did, was first to disconnect by bb8 (bb8.disconnect) and then stop the script (process.exit()) within the callback section.
What is the difference if I just keep process.exit ? Does at mean next time the connection to the bb8 is going to be quicker because not fully disconnected last time? I tried but I don't see a real difference but I am not sure to understand the logic and the impact between the options to properly ends a script and make my bb8 available for any other scripts that could be run afterward.
Thanks in advance for your help
Hi,
I don't know if this is a bug with the sphero sdk or something wrong in a way the device is connected with the express server, but after ~20 minutes, the device is suddenly and constently disconnected while the server remains alive.
I have even created a script in charge to "post" a ping command every minute but still, my bb8 becomes orange after sometime and I have to stop the server and run it again.
This issue prevent me to use my bb8 with the different workflows tool (ifttt, node-red, ms flow, etc...) I wanted to put in place.
Any idea?
French bb8-Commander user/fan !
Hi,
I want to create a new BB8 commander script that will take a text on input and will translate the message in morse mode by blinking.
To do that, I need to install into /usr/local/lib/node_modules/bb8-commander/node_modules package named morse (https://www.npmjs.com/package/morse)
Unfortunately, probably because of permission issues I am not able to install this package with a simple npm install morse --save into this directory.
Question is, how to install a new package required for a new command? I can probably change the permissions or find another workaround but I am sure there is a proper way to do that and facilitate the creation of new scripts.
Thanks!
Regards,
I think that the stopOnDisconnect()
function mentioned in the docs might accomplish this?
I ran into this when I ran the command, but the lights didn't turn off or anything. Not sure if this is expected behavior, but it's @ the very least not consistent with what the iOS seems to do.
On a macbook pro running high sierra and node v9.4.0, running the bb8 setup command gets stuck in "Beginning Setup"
Able to discover the device using noble.
Hi,
When I disconnect my BB8 with the "disconnect" command, he become black up to the moment where I press ctrl-c and he remains orange for a while (I do not know exactly how many time). Is there anything to do to prevent this inconsistency and keep my bb8 off after the ctrl-c ?
Thanks!
Maybe some modes (such as desk-buddy) could benefit from sound effects.
A possible source (beware licensing issues; maybe the sounds should be user-provided):
https://github.com/r0ndL/BB-8-Dicso-Droid-Module/tree/master/BB-8%20Sounds
Hey all,
I'm working on a BB-8 desktop app using electron. I noticed that if I send the disco (or any custom) command to the Express server, the script never stops executing.
If I use process.exit(), the Express server stops. (I'm new to Node.js). I found one blog post that talks about throwing an exception, but not sure if/where that can be handled gracefully.
// disco.js
module.exports = function (bb8) {
console.log('Let\'s Party!!');
bb8.randomColor();
setInterval(function () {
bb8.randomColor();
}, 1000);
setTimeout(function () {
process.exit();
}, 2000);
};
Is there any other way to end the custom commands after a given time without fully disconnecting from the Express server?
bb8 weather --city="freiburg" --country="de" --api-key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
error: unknown option
--api-key' `
Do I do something wrong? Typo or sth?
Let someone else control your BB8 when you can't. We then AI!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.