Coder Social home page Coder Social logo

bb8-commander's Introduction

bb8-commander's People

Contributors

mintuz avatar saraford avatar shaunbent avatar sud-puth avatar vhbfernandes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bb8-commander's Issues

Express server does not work on MacOS

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

Disconnect throws an error

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)

bb8 setup stuck at "beginning setup"

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.

Unexpected Express server disconnection

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 !

[IDEA] Has anyone played with Collision Detection?

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);
}

Disconnect command does not seem to properly stop BB8

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.

BB8 remains orange for a while after disconnection

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!

"End of script" best practices

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

best practice to install a new npm package for BB8 commander

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,

How to stop an Express script command without stopping the express server?

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.