rwaldron / galileo-io

Intel Galileo & Intel Edison IO Plugin for Johnny-Five
http://johnny-five.io
MIT License
101 stars 26 forks source link

Getting started requirements #10

Open glued opened 10 years ago

glued commented 10 years ago

Are there specific requirements (node version etc) to get galileo-io up and running. Using the "full Linux" installation and run the script below doesn't give me any errors when starting but also doesn't start blinking.

var Galileo = require("galileo-io"); var board = new Galileo();

board.on("ready", function() { var byte = 0; this.pinMode(13, this.MODES.OUTPUT);

setInterval(function() { board.digitalWrite(13, (byte ^= 1)); }, 500); });

rwaldron commented 10 years ago

Are there specific requirements (node version etc) to get galileo-io up and running

Galileo-io is supported on node 0.8.x and 0.10.x.

Can you run that code and paste the terminal output?

glued commented 10 years ago

I'm running 0.8.x but no terminal output unless i put a console.log() and actually board.on("ready") is called (if i put a log within that) but still not seeing the onboard led ( pin13 ) blink like the example below... StandardFirmata isnt required correct?

Like the Arduino IDE example Examples > 01.Basics > Blink which does work...

int led = 13;
void setup() {                
  pinMode(led, OUTPUT);     
}
void loop() {
  digitalWrite(led, HIGH);
  delay(1000);
  digitalWrite(led, LOW);
  delay(1000); 
}
rwaldron commented 10 years ago

I'm running 0.8.x but no terminal output unless i put a console.log() ...

Sorry if this is a dumb question: you're running this code on the galileo board, correct? ie. either ssh'ed or screen'ed?

Like the Arduino IDE example Examples > 01.Basics > Blink which does work...

It works exactly right if you attach a real led to pin 13 and gnd. I'm trying to figure out why the on-board isn't working as expected.

rwaldron commented 10 years ago

Make sure you're not running a sketch and simultaneously running another program that wants to control GPIOs

glued commented 10 years ago

yep SSH'ed into it it, and used sftp to transfer the files over before running node. Is there any additional debug info i can get from galileo-io

rwaldron commented 10 years ago

Check this out: https://communities.intel.com/message/211375#211375

If that's true then it would explain exactly why this doesn't work

rwaldron commented 10 years ago

Check this out: https://communities.intel.com/message/211375#211375

If that's true then it would explain exactly why this doesn't work. I'm reviewing the schematic and reference designs to confirm.

glued commented 10 years ago

oh interesting, will check my setup with an actual LED when i get off work ^_^

rwaldron commented 10 years ago

Check this out:

I'm going to dig into the galileo-specific Arduino library code that would be used with that blink sketch and figure out how the hell they are disambiguating uses of pin 13 (somehow I don't think I'm going to like what I find)

glued commented 10 years ago

I don't believe theres a sketch running, is there a way to check and or clear while SSHed in?

rwaldron commented 10 years ago

I don't believe theres a sketch running, is there a way to check and or clear while SSHed in?

I asked this question prematurely.

rwaldron commented 10 years ago

@glued https://communities.intel.com/message/236683#236683

This message seems promising: https://communities.intel.com/message/237721#237721