Monday, November 16, 2015

Get Online Anonymously With 2 Years Of Private Internet Access VPN

The secret to keeping your personal information safe when you’re online—whether you’re logging on halfway around the world or just halfway down the block—is using a VPN service. Private Internet Access VPN is one of the best ones out there, and we’re giving you a two-year subscription to it for just $59.95. Aptly named, Private […]

Continue reading %Get Online Anonymously With 2 Years Of Private Internet Access VPN%


by SitePoint Offers via SitePoint

Gesture Control via the Myo Armband in Node.js

In a world where we all want to control our gadgets via movements that make us feel like wizards, the Myo armband is a blessing. It brings some very neat gesture control to applications in an impressively simple way. Whilst you can implement the Myo API in iOS and Android, I'm a JavaScript developer at heart and love connecting this sort of thing to Node servers - so in this article we'll be doing just that! We will be looking at using the Myo npm package to bring this functionality to a Node server.

[caption id="attachment_118975" align="aligncenter" width="1024"]Photo Credit: Thalmic Labs Photo Credit: Thalmic Labs[/caption]

[author_more]

What You'll Need

  • A Myo Armband
  • Myo Connect - This will need to be installed and running on your computer.
  • Windows or Mac OSX - Myo does not currently seem to have Myo Connect available for Linux.
  • A basic understanding of using Node - Peter Dierx at SitePoint has written a pretty comphrensive guide on starting with npm.

Getting Started

Before going any further, ensure that:

  • You are wearing your Myo armband and it is charged up and ready to go!
  • You've got your Myo armband's Bluetooth adapter plugged into the USB port closest to the arm wearing your Myo armband (a new requirement for later versions of the Myo software).
  • You've got Myo Connect running on your PC
  • You remember how to unlock your Myo armband so that it detects your gestures (tap your thumb and middle finger).

If you have all of that sorted, we can begin!

Starting Your Project

Create a new npm enabled project on your computer via the usual npm init (or by making your own package.json file). Install the npm module via npm install myo --save and create a file called index.js (or whatever you'd prefer your Node's main file to be) for your code. When you want to run the server, run the usual node index.js command.

You could use the same concepts on the front end via Browserify too - however we won't be covering Browserify in this article.

Start your index.js file with a require statement to bring in the Myo npm module

[code language="js"]
var Myo = require("myo");
[/code]

Then, run Myo.connect() with a namespace you come up with (e.g. com.yourCompany.yourProject):

[code language="js"]
Myo.connect("com.sitepoint.myoarmbandcontroller");
[/code]

Detecting Myo Connections

In order to detect when a Myo Armband connects, we can use the "connected" event. It provides a data variable and a timestamp variable upon success:

[code language="js"]
Myo.on("connected", function(data, timestamp) {
console.log("Myo successfully connected. Data: " + JSON.stringify(data) + ". Timestamp: " + timestamp + ".");
});
[/code]

The data variable provides a JSON object that looks like so:

[code language="js"]
{
"mac_address" : "2b-or-n0-2b-QQ-QQ",
"myo" : 0,
"name" : "Stark",
"timestamp" : "35259097032",
"type" : "connected",
"version" : [1,5,1970,2]
}
[/code]

It provides the MAC address of the Myo, the index of the Myo (if you have more than one), the name you gave that Myo, the timestamp of when it connected (exactly the same as the timestamp variable also available in the callback above), the type of event which triggered this data and the version of Myo Connect you are using.

There is a much better way of retrieving data about your Myo armband from event calls like this one which we will look at later in this article (the version number seems to come through as an array above, it comes through as a version number separated by dots in the other version of the call).

Detecting Poses

The most common thing every developer wants to use the Myo Armband for is to detect when the user makes certain poses. "Poses" are what Myo calls the specific gestures which Myo understands. These include fist, fingers_spread, wave_in, wave_out and double_tap.

Continue reading %Gesture Control via the Myo Armband in Node.js%


by Patrick Catanzariti via SitePoint

Asylum Marketing

A digital marketing agency focused on data and strategy, constantly looking for statistical patterns for marketing success.


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

CityTours – Tours, Tickets & Guides

CityTours is an HTML5 site template suitable for companies/agencies that provide services for tourist. PURCHASE NOW: http://ift.tt/1GjsD2a


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Alexis Malin – UI/UX Design

Hi ! I’m Alexis Malin, a young UI/UX Designer / Photographer / Videomaker from France . I love discovering the world, jazz-funk and folk, craft beer and fishing.


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Wikitongues

Wikitongues is a movement for language rights. Together with speakers and signers of every language in the world, we’re building the most inclusive cultural archive ever made, raising awareness about linguistic diversity and rallying to defend it.


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Sounds Like Muntpunt

You can discover a city through pictures taken on a Japanese’s selfiestick, or by reading a simple tourist map. Both ways are boring. Eavesdropping on a city though, is way more interesting. Therefore Roundhouse, Lunar Gravity and the students of R


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery