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

com.appshed.ioioplugin

v0.0.3

Published

This is cordova android plugin for controlling [IOIO OTG](https://github.com/ytai/ioio/wiki) It provides javascript inteface to interrcat with the board

Downloads

6

Readme

IOIO Corvova Plugin

This is cordova android plugin for controlling IOIO OTG It provides javascript inteface to interrcat with the board

Also you will need to read this article to find out how pins work https://github.com/ytai/ioio/wiki/Getting-To-Know-The-Board#detailed-pin-function-table

How to install

You can use plugman to install the plugin

plugman install --platform android --project <path to your project>/platforms/android --plugin https://github.com/AppShed/ioio-cordova-plugin

Read about plugman

Requirements

The only requirement is that your IOIO firmware must be up to date. (App-IOIO0500.ioioapp was the latest firmware at the moment of writing this article)

Here is a link that explains how to check your current firmware and update it https://github.com/ytai/ioio/wiki/IOIO-OTG-Bootloader-and-IOIODude

How to use

First of all you need to define port you want to work with. Once IOIO succesfully initialized, led on IOIO started blinking

window.ioio.open({ // start ioio and open ports we need
	inputs: {
		analogue: [37,39,40,41],
		digital:[38]
    },
	outputs: {
		digital:[33],
		pwm: [
			{pin: 10, freq: 1}, // set default frequency for the pin 10
			{pin: 12, freq: 1}
		]
	},
	delay: 200 // Optionally set minimum delay between receiving data from IOIO
}, function() {
	// success
}, function() {
	//fail
}, function(vals) {
	// global all open pin listener

	for(var i=0;i<vals.length;i++){
		var pin = vals[i];
		//for(var key in pin){console.log(key + ":" + pin[key]);}
		switch(pin.class){
			case window.ioio.PIN_INPUT_DIGITAL:
			case window.ioio.PIN_OUTPUT_DIGITAL:
			case window.ioio.PIN_INPUT_ANALOG:
			//pin.pin pin.value
			break;
			case window.ioio.PIN_OUTPUT_PWM:
			//pin.pin pin.freq
			break;
		}
	}
});

You can add some listeners to read values from pins

	window.ioio.addPinListener(37, function(value) { // parameter value is boolean for digital ports and float for other ports in range from 0.00000 to 1.00000
		// todo
	});

	window.ioio.addValuePinListener(37, 0.5, function(value) { // if value goes high that 0.5 it will fire, if it then goes lower, it will fire again
		// todo
	});

And you can control some pins

	window.ioio.setPwnOutput(10, 0);  // set frequency for the pin 10
	window.ioio.setPwnOutput(12, 0); // set frequency for the pin 12
	window.ioio.setDigitalOutput(33, true);  // enable pin 33
	window.ioio.setDigitalOutput(33, false); // disable pin 33
	window.ioio.toggleDigitalOutput(33); // toggle pin 33
	
	

Once you finish, you have to close IOIO

	window.ioio.close(); // finish work with ioio