Giter Club home page Giter Club logo

electron-johnny-five-examples's People

Contributors

freeman-lab avatar sofroniewn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

electron-johnny-five-examples's Issues

electron-rebuild error

Hi,

I try to follow the installation and when running electron rebuild it said:

An unhandled error occurred inside electron-rebuild
Unable to find parent node_modules directory, specify it via --module-dir, E.g. "--module-dir ." for the current directory

Error: Unable to find parent node_modules directory, specify it via --module-dir, E.g. "--module-dir ." for the current directory
at Object. (E:\arduino\electron-johnny-five-examples\1-led\node_modules\electron-rebuild\lib\src\cli.js:79:23)
at next (native)
at fulfilled (E:\arduino\electron-johnny-five-examples\1-led\node_modules\electron-rebuild\lib\src\cli.js:5:58)

I am on win 10 x64.
Thank you.

i can't access the board !

i'm trying to work with arduino uno on the first project ( led ) , but the status is never changed ! , the button is still disabled and i don't know what to do to make it enabled ! , the board is connected and i can access it through the arduino IDE , but nit through this repo !!

Tutorial no. 9 is not the last no more

You could change the last line in readme.md in tut no. 9 to the readme.md at tutorial 10. The one that reads
"Congrats! You've gone through all the examples - go and build something amazing!"
you might want to replace it by a link to tutorial 10, as you've done in every other tutorial and move that line to tutorial 10.
Any way is just a small detail.

Hook in our stream

May I ask what does this part of code do:
https://github.com/sofroniewn/electron-johnny-five-examples/blob/master/2-switch/app/index.js#L5-L15

var Readable = require('stream').Readable  
var util = require('util')  

util.inherits(MyStream, Readable)  
function MyStream(opt) {  
  Readable.call(this, opt)
}
MyStream.prototype._read = function() {};  
// hook in our stream
process.__defineGetter__('stdin', function() {  
  if (process.__stdin) return process.__stdin
  process.__stdin = new MyStream()
  return process.__stdin
})

"Uncaught Error: Module version mismatch." in bindings.js

I'm stuck on an error in the Electron Console that's preventing the 1-led script from reaching the point of communicating with my Arduino board (a Mega 2560).

I'm running:

  • OS X El Capitan v10.11.5
  • Node v6.2.2
  • npm v3.9.5
  • Arduino IDE v1.6.9

These are the steps I've followed:

  1. connect Arduino to computer via USB, and connect a LED as shown
  2. in Arduino IDE, verify that Board is Arduino/Genuino Mega or Mega 2560
  3. verify that Processor is ATmega2560 (Mega 2560)
  4. verify that Port is /dev/cu.usbmodem1421 (Arduino/Genuino Mega or Mega 2560)
  5. verify that Programmer is AVRISP mkII
  6. open File > Examples > Firmata > StandardFirmata
  7. upload to Arduino
  8. close Arduino IDE
  9. in terminal, git clone [email protected]:sofroniewn/electron-johnny-five-examples.git
  10. cd electron-johnny-five-examples/1-led/
  11. npm install
  12. ./node_modules/.bin/electron-rebuild
  13. npm start

At this point, the Electron app starts and opens a new window. The "Click me!" button is initially disabled, but it never becomes enabled. If I open Developer Tools, I see this error in the Console:

/Users/twarr/electron-johnny-five-examples/1-led/node_modules/bindings/bindings.js:83 Uncaught Error: Module version mismatch. Expected 47, got 48.

I did some Googling and it appears that this can happen if a package is installed with one version of Node, then another version is later installed:

http://stackoverflow.com/questions/15584529/module-version-mismatch-expected-11-got-1

That didn't happen in my case, but I tried the recommended solution anyways:

rm -rf node_modules; npm update

That results in:

npm WARN prefer global [email protected] should be installed with -g

> [email protected] install /Users/twarr/electron-johnny-five-examples/1-led/node_modules/nslog
> node-gyp rebuild

  CXX(target) Release/obj.target/nslog/src/main.o
  CXX(target) Release/obj.target/nslog/src/nslog_mac.o
  SOLINK_MODULE(target) Release/nslog.node

> [email protected] install /Users/twarr/electron-johnny-five-examples/1-led/node_modules/serialport
> node-pre-gyp install --fallback-to-build

[serialport] Success: "/Users/twarr/electron-johnny-five-examples/1-led/node_modules/serialport/build/Release/serialport.node" is installed via remote

> [email protected] postinstall /Users/twarr/electron-johnny-five-examples/1-led/node_modules/electron-prebuilt
> node install.js

[email protected] /Users/twarr/electron-johnny-five-examples/1-led
├── [email protected]
├── [email protected]
└── [email protected]

However, that doesn't appear to have any effect; running npm start again, I still see the same error in the Electron Console.

While this issue doesn't appear to be unique to this repo (it seems to be a general Node issue that can occur under a variety of circumstances), it does happen (at least for me) after following all instructions in the 1-led example exactly, so I'm hoping it's something you've encountered or are familiar with.

Please let me know if you have any troubleshooting ideas, or if you need me to provide any more details. I'm not sure how to proceed. Thanks!

ADD troubleshooting to readme

Awesome job @sofroniewn!

aside from the serialport trouble, I had to upload the firmata standard firmware to my arduino to make it work. I had some goofy custom code on there before. It might be worth mentioning that in the readme.

This is from the johnny-five docs:

If the above didn't work as expected, make sure that StandardFirmata is installed on the board:

Download Arduino IDE
Plug in your Arduino or Arduino compatible microcontroller via USB
Open the Arduino IDE, select: File > Examples > Firmata > StandardFirmata
Click the "Upload" button.
If the upload was successful, the board is now prepared and you can close the Arduino IDE.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.