GithubHelp home page GithubHelp logo

billthebest / pinoccio-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from soldair/pinoccio-server

0.0 2.0 0.0 224 KB

a pinoccio command server for your local network. proxies to the pinocc.io api for historical data streams and outside access!

License: MIT License

JavaScript 100.00%

pinoccio-server's Introduction

Build Status

pinoccio-server

a pinoccio command server for your local network. proxies to the pinocc.io api for historical data streams and outside access!

the neat thing is that if you use this server HQ will still work and you can still use the api streams to make rad things!

var server = require('pinoccio-server');

server(function(troop){

  troop.command(1,'led.red',function(err,data){
    console.log('i set the led to red',data);
  })
  
})

you can use the troop stream directly if you want to implement your own server logic

var commands = require('pinoccio-server/troop');
// example todo...

you can use the bridging directly if you want to hook things into the board api or bridge to more external servers.

i dont know if thats a good idea but we'll see ;)

var bridge = require('pinoccio-server/bridge');
// example todo ....

Connect your Troop to your server

Option 1: Using Bridge Mode

Plug in your Scout (USB), turn it on, and bridge it (in a new terminal tab)...

$ pinoccio bridge -v --host 127.0.0.1

By default, your sever will be running on localhost. We added -v to get verbose output, which is more fun.

Option 2: Using a WiFi Lead Scout

Set a new HQ address on the Lead Scout and reassociate the WiFi.

> hq.setaddress("YOUR_IP_ADDRESS"); wifi.reassociate;

Your Lead will disconnect from Pinoccio's HQ, and reconnect to your local server (you'll see some output in your terminal when it does).

If you want to make this change stick when your Lead Scout reboots, you'll need to add it to your startup function, e.g.

> function startup {hq.setaddress("YOUR_IP_ADDRESS"); wifi.reassociate;}

pinoccio-server's People

Contributors

soldair avatar nvcexploder avatar

Watchers

James Cloos avatar Bill J. avatar

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.