Ok Paul,
Thanks to your help I have a working example; so I thought I would report back.
I loaded the StandardFirmata example (in Arduino IDE), and uploaded to the Teensy 3.1 board.
I tested with your firmata_test app in OSX; and it works.
So to get in working with node-red I installed the Firmata node, like so:
Code:
cd node-red
npm install firmata
node red.js -v
Then open Chrome at http://localhost:1880/
In the menu, Import from..> Clipboard
and paste the following code:
(Change "/dev/ttyUSB0" to your current Teensy serial USB connection, for example: "/dev/tty.usbmodem30851")
Code:
[{"id":"d7663aaf.47194","type":"arduino-board","repeat":"25","device":"/dev/ttyUSB0"},{"id":"8c09ca6c.a975d","type":"arduino out","name":"","pin":"13","state":"OUTPUT","arduino":"d7663aaf.47194","x":509.16667556762695,"y":162.16666984558105,"wires":[]},{"id":"e37b6a97.610968","type":"inject","name":"tick","topic":"","payload":"","repeat":"0.5","once":false,"x":116.16668319702148,"y":62.16666507720947,"wires":[["60b4aeaa.800d58"]]},{"id":"60b4aeaa.800d58","type":"function","name":"Toggle output on input","func":"\n// initialise level as a context variable if currently undefined \n// (context variables persist between calls to the function)\ncontext.level = context.level || false;\n\n// if it's a 0 make it a 1 else make it a 0...\ncontext.level = !context.level;\n\n// set the payload to the level and return\nmsg.payload = context.level;\nreturn msg;","outputs":1,"x":298.1666793823242,"y":113.16665458679199,"wires":[["8c09ca6c.a975d"]]}]
This will create 3 linked nodes, one will be called "Pin 13". You can double click on it to to see your serial port, for example "/dev/tty.usbmodem30851".
When you click "Deploy" (in node-red) Pin 13 LED is now blinking.
Possible problems (If you didn't change your Serial Port in the Paste code above):
When you started node-red in Terminal with the -v option, you can see any error messages; you probably will have "Error: Cannot open /dev/ttyUSB0", so in node-red double click Pin 13, add your Teensy Serial Port, then click the "config" panel & delete the ttyUSB0.
That is as far as I have got, hopefully it is enough to get anyone interesting in using node-red with Teensy started.
)
Carlos