Skip to content

Instantly share code, notes, and snippets.

@derekwheee
Last active November 7, 2015 20:35
Show Gist options
  • Save derekwheee/1c9363e34ec297f31eb4 to your computer and use it in GitHub Desktop.
Save derekwheee/1c9363e34ec297f31eb4 to your computer and use it in GitHub Desktop.
nodebots-interchange

Flashing HC-SR04 to Arduino with no port specified

With jumper from 5V -> D2. Lights blink during flash, then error throws.

$ interchange install hc-sr04
Installing hc-sr04 from npm
nodebots-hcsr04@0.4.0 node_modules/nodebots-hcsr04
found nano on port /dev/cu.usbserial-AL00RJ08
connected
reset complete.
flashing, please wait...
flash complete.
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: Invalid port specified: 
    at new SerialPort (/Users/notbook/git/tmp/node_modules/nodebots-interchange/node_modules/serialport/serialport.js:134:13)
    at Client.Object.defineProperties.port.set (/Users/notbook/git/tmp/node_modules/nodebots-interchange/lib/interchange_client.js:107:39)
    at set_firmware_details (/Users/notbook/git/tmp/node_modules/nodebots-interchange/bin/interchange.js:109:20)
    at /Users/notbook/git/tmp/node_modules/nodebots-interchange/bin/interchange.js:164:13
    at /Users/notbook/git/tmp/node_modules/nodebots-interchange/node_modules/avrgirl-arduino/avrgirl-arduino.js:263:16
    at /Users/notbook/git/tmp/node_modules/nodebots-interchange/node_modules/avrgirl-arduino/node_modules/stk500/index.js:332:11
    at /Users/notbook/git/tmp/node_modules/nodebots-interchange/node_modules/avrgirl-arduino/node_modules/stk500/node_modules/async/lib/async.js:251:17
    at /Users/notbook/git/tmp/node_modules/nodebots-interchange/node_modules/avrgirl-arduino/node_modules/stk500/node_modules/async/lib/async.js:154:25
    at /Users/notbook/git/tmp/node_modules/nodebots-interchange/node_modules/avrgirl-arduino/node_modules/stk500/node_modules/async/lib/async.js:248:21
    at /Users/notbook/git/tmp/node_modules/nodebots-interchange/node_modules/avrgirl-arduino/node_modules/stk500/node_modules/async/lib/async.js:612:34

Flashing HC-SR04 to Nano with port specified

With jumper 5V -> D2 works great.

$ interchange install hc-sr04 -p /dev/cu.usbserial-AL00RJ08 
Installing hc-sr04 from npm
nodebots-hcsr04@0.4.0 node_modules/nodebots-hcsr04
connected
reset complete.
flashing, please wait...
flash complete.
Setting firmware details
Cleaning up. Installation complete.

Flashing HC-SR04 Firmata to Nano

Works like a charm

$ interchange install hc-sr04 --firmata  -p /dev/cu.usbserial-AL00RJ08 
Installing hc-sr04 from npm
nodebots-hcsr04@0.4.0 node_modules/nodebots-hcsr04
connected
reset complete.
flashing, please wait...
flash complete.

Flashing StandardFirmata to Pro Mini

No problems

$ interchange install StandardFirmata -a pro-mini -p /dev/cu.usbserial-A60443AT
Retrieving manifest data from GitHub
Downloading hex file
connected
reset complete.
flashing, please wait...
flash complete.

Flashing HC-SR04 to Pro Mini

With jumper VCC -> 2 works great.

$ interchange install hc-sr04 -a pro-mini -p /dev/cu.usbserial-A60443AT
Installing hc-sr04 from npm
nodebots-hcsr04@0.4.0 node_modules/nodebots-hcsr04
connected
reset complete.
flashing, please wait...
flash complete.
Setting firmware details
Cleaning up. Installation complete.

Flashing HC-SR04 Firmata to Pro Mini

No problems

$ interchange install hc-sr04 --firmata -a pro-mini -p /dev/cu.usbserial-A60443AT
Installing hc-sr04 from npm
nodebots-hcsr04@0.4.0 node_modules/nodebots-hcsr04
connected
reset complete.
flashing, please wait...
flash complete.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment