Created
          April 27, 2015 13:56 
        
      - 
      
 - 
        
Save monteslu/553760e27ca59fbf9b10 to your computer and use it in GitHub Desktop.  
    j5 from a tcp socket client
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | var net = require('net'); | |
| var five = require('johnny-five'); | |
| var options = { | |
| host: 'localhost', //any tcp host | |
| port: 3001 // any port | |
| }; | |
| var client = net.connect(options); | |
| var board = new five.Board({port: client}); | |
| board.on('ready', function(){ | |
| console.log('five ready'); | |
| //Full Johnny-Five support here: | |
| var led = new five.Led(13); | |
| led.blink(500); | |
| }); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment