npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ez-b

v0.0.1

Published

Connect to EZ-Builder from any OS anywhere!

Downloads

4

Readme

EZ-B

EZ-B Allow to set values into a EZ-Builder through socket communication. In order for this module to work you must enable Server communication in the EZ-Builder

How to Install

npm install ez-b

How to use

First, require ez-b:

var ez_b = require('ez-b');

Next, enable the server in EZ-Builder in order to allow TCP connections.

Connect to your EZ-Builder server

	ez_b.connect({host:'localhost', port:6666});

That is it!!! Now you are ready to start sending command to your EZ-B from Nodejs

Example 1

Connect to EZ-Builder and connect to board 0

var ez_b = require('ez-b');
  
	ez_b.connect({host:'localhost', port: 6666});
	ez_b.connectBoard(0);

Control Servo using jQueryUI and BootStrap

First, install ez-b and socket.io

npm install ez-b
npm install socket.io

Setup your application to listen to incomming messages from a webpage

var ez_b = require("ez-b");
var io = require('socket.io').listen(8888);

ez_b.connect({host:'localhost', port:6666});

io.sockets.on('connection', function(socket){
	socket.on('action', function(data){
		if(data.action.toString() == "moveServo"){
			ez_b.Servo(data.servo.toString(), data.position.toString());
		}	
	});
}); 

Create a web page with jQueryUI and BootStrap

<!DOCTYPE html>
<html>
<head>
	<title>EZ-Robot</title>
	<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
	<link href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" rel="stylesheet">
	<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
	<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>
	<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
	<script src="https://raw.github.com/cdnjs/ajax2.cdnjs.com/master/ajax/libs/socket.io/0.8.4/socket.io.min.js"></script>
	
</head>
<body>
	<style type="text/css">
	body{
		padding: 10px;
	}
	</style>
	<h1>Robot Control</h1>
	
	<div class="alert alert-info">
		<h3>Servo Control: <span id="servoValue">20</span></h3>
		<div class="servoSlide"></div>
	</div>

	<script type="text/javascript">
		var socket = io.connect('http://localhost:8888');

		$(document).ready(function(){
			$(".servoSlide").slider({min:1, max:100});

			$(".servoSlide").on("slide", function(event, ui){
				$("#servoValue").text(ui.value);
			});

			$(".servoSlide").on("slidestop", function(event, ui){
				socket.emit('action', {
					action:'moveServo',
					position: ui.value,
					servo: 'D14'
				});
			});
		});
	</script>
</body>
</html>

##Commands Avalible


Say(str);
Servo(port, position);
PWM(digitalPort, speed);
PWMRandom(digitalPort, lowspeed, highspeed);
Set(digitalPort, state);
ServoSpeed(digitalPort, speed);
ServoSpeedRandom(digitalPort, lowspeed, highspeed);
ServoUp(digitalPort, count);
ServoDown(digitalPort, count);
ServoSpeedRandom(digitalPort, lowPosition, highPosition);
Release(servoPort);
Move(servoPort, where);
SetRandom(digitalPort);
ToggleDigital(digitalPort);
Forward();
Reverse();
Left();
Right();
Up(milliSeconds);
Down(milliSeconds);
RollRight(milliSeconds);
RollLeft(milliSeconds);
Stop();
Land();
TakeOff();
DroneEmergency();
SpeakStop();
SpeakRSS (url, [index]);
SpeakTwitter(username, [index]);
SendSerial(digitalPort, baudRate, data);
MP3TriggerPlayTrack(digitalPort, baudRate, trackNumber, [pauseTime]);
MP3TriggerPlayRandomTrack(digitalPort, baudRate, lowestTrackNum, highestTrackNum);
MP3TriggerNext(digitalPort, baudRate);
MP3TriggerStop(digitalPort, baudRate);
MP3TriggerPrev(digitalPort, baudRate);
ControlCommand(windowName, ControlCommandParameter, [values]);
Tweet(message);
Roomba(cmd);
Halt();
Exec(exe, [parameters]);
Browser(url);
PlayAudio(url);
StopAudio();
Pause();
LoadProject(url);

//Only available through ez-b nodejs

ConnectBoard(boardNumber);
DisconnectBoard(boardNumber);
ConnectAllBoard(boardNumber);
DisconnectAllBoard(boardNumber);
RunScript(scriptName); 

Exit();

For more information about Ez-Builder commands please visit http://www.ez-robot.com

License

(The BSD License)

Copyright (c) 2013 Carlos Martin <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.