GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Added new getting started guide for node js by liam-b · Pull Request #357 · ev3dev/ev3dev.github.io Conversation
|
There was an error while loading. Please reload this page.
|
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for writing this up! It looks great; I added a fair number of nit-picking comments because I'm a perfectionist 😉
Can you update the description here to include "getting started guides" for this catagory?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| --- | ||
|
|
||
| {% include /style/icon.html type="warning" %} | ||
| Note that Node JS run really slowly on the EV3 brick and is limited to NPM version 0.10.29 which can be a problem when trying to install some libraries. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
run -> runs
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| --- | ||
|
|
||
| {% include /style/icon.html type="warning" %} | ||
| Note that Node JS run really slowly on the EV3 brick and is limited to NPM version 0.10.29 which can be a problem when trying to install some libraries. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
"really" sounds mildly unprofessional in this context. Can we use another word there?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| --- | ||
|
|
||
| {% include /style/icon.html type="warning" %} | ||
| Note that Node JS run really slowly on the EV3 brick and is limited to NPM version 0.10.29 which can be a problem when trying to install some libraries. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
NPM is npm
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| --- | ||
|
|
||
| {% include /style/icon.html type="warning" %} | ||
| Note that Node JS run really slowly on the EV3 brick and is limited to NPM version 0.10.29 which can be a problem when trying to install some libraries. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It's also limited to an equivalently old Node.js version, which should also be mentioned.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Note that Node JS run really slowly on the EV3 brick and is limited to NPM version 0.10.29 which can be a problem when trying to install some libraries. | ||
| {: .alert .alert-warning} | ||
|
|
||
| **Before you start, make sure that you have configured a network connection to |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can you link to the tutorials that we have for these tasks?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| sensor.mode = 'NEW-MODE'; // where 'NEW-MODE' can be replaced by any valid mode | ||
| ``` | ||
|
|
||
| And then using `sensor.someValueAcessor` will return the sensor value, where `someValueAcessor` can be replaced by any valid accessor (also found on the [default supported sensors](http://wasabifan.github.io/ev3dev-lang-js/modules/_sensors_.html) list by clicking on the sensor you are using) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
accessor (two Cs)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| And then using `sensor.someValueAcessor` will return the sensor value, where `someValueAcessor` can be replaced by any valid accessor (also found on the [default supported sensors](http://wasabifan.github.io/ev3dev-lang-js/modules/_sensors_.html) list by clicking on the sensor you are using) | ||
|
|
||
| ## Next steps | ||
| So that's the basic overview of how to use node with ev3dev! For info on all supported sensors, motors and other documentation visit the [github page](https://github.com/wasabifan/ev3dev-lang-js) and the [documentation page](http://wasabifan.github.io/ev3dev-lang-js). |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Remove "So"
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ## Next steps | ||
| So that's the basic overview of how to use node with ev3dev! For info on all supported sensors, motors and other documentation visit the [github page](https://github.com/wasabifan/ev3dev-lang-js) and the [documentation page](http://wasabifan.github.io/ev3dev-lang-js). | ||
|
|
||
| The documentation page looks a bit confusing, but what you really need to worry about are the names of the classes and the **methods** / **accessors**. (eg. the large motor has **methods** such as: `runForever()`, `runForTime()` etc and the color sensor has **accessors** such as: `reflectedLightIntensity`, `ambientLightIntensity` etc) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
ambientLightIntensityetc
should be
ambientLightIntensity, etc.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| The documentation page looks a bit confusing, but what you really need to worry about are the names of the classes and the **methods** / **accessors**. (eg. the large motor has **methods** such as: `runForever()`, `runForTime()` etc and the color sensor has **accessors** such as: `reflectedLightIntensity`, `ambientLightIntensity` etc) | ||
|
|
||
| The [sensor list](http://docs.ev3dev.org/projects/lego-linux-drivers/en/ev3dev-jessie/sensor_data.html) and the [motor list](http://docs.ev3dev.org/projects/lego-linux-drivers/en/ev3dev-jessie/motor_data.html) are both really useful pages aswell. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
really -> extremely
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| The documentation page looks a bit confusing, but what you really need to worry about are the names of the classes and the **methods** / **accessors**. (eg. the large motor has **methods** such as: `runForever()`, `runForTime()` etc and the color sensor has **accessors** such as: `reflectedLightIntensity`, `ambientLightIntensity` etc) | ||
|
|
||
| The [sensor list](http://docs.ev3dev.org/projects/lego-linux-drivers/en/ev3dev-jessie/sensor_data.html) and the [motor list](http://docs.ev3dev.org/projects/lego-linux-drivers/en/ev3dev-jessie/motor_data.html) are both really useful pages aswell. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
aswell -> as well
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Hey! Yeah, I'm not the greatest at writing documentation :). Thanks for editing it though! I added 'getting started guides' to the description of that category and went through and fixed what you pointed out (I haven't committed some things yet). Just a quick question, what other versions are npm limited to? Because it's 0.10.29 on my brick. Thanks, |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
No problem! It's always easier to spot issues as a reviewer than as the original author... You grow blind out of familiarity.
npm may be at that version -- I've never actually checked; my comment was that Node.js itself is stuck on 0.10 or 0.12 (I can't remember exactly) and support has essentially been dropped for the EV3's processor since. When you said "npm" did you mean "node"? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I added my suggested changes to this PR; @liam-b if you disagree with any of them, feel free to edit it back or ask! @dlech can you take a quick pass over this? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| {% include /style/icon.html type="warning" %} | ||
| Note that Node JS run really slowly on the EV3 brick and is limited to NPM version 0.10.29 which can be a problem when trying to install some libraries. | ||
| Note that Node.js runs frustratingly slowly on the EV3 brick and is limited to an old version of both Node.js and npm. You may want to consider using Python or another ev3dev-supported language instead. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It looks like non-EV3 stretch images are going to have node 4.7.2
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| - id: software-languages | ||
| title: Programming Languages and Tooling | ||
| description: "Configuring a development environment, installing new languages, and using advanced language tools." | ||
| description: "Configuring a development environment, installing new languages, using advanced language tools and getting started guides for languages." |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It might be better to put "getting started" first in the list.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| <p class="lead"> | ||
| Node.js is a framework that allows you to run JavaScript as a local application. It is designed to make building servers and other asynchronous apps as easy as possible. In this tutorial, we'll show you how to get up-and-running with Node.js on ev3dev. | ||
| </p> |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Just do {: .lead} at the end here. Kramdown automatically creates the paragraph element.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| To start, navigate to a project directory (e.g `~/src/js`) that we can store our files in: | ||
|
|
||
| ```shell | ||
| mkdir -p ~/src/js && cd ~/src/js |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This might be better as 2 separate lines instead of &&
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ```javascript | ||
| var ev3dev = require('ev3dev-lang'); | ||
|
|
||
| var motor = new ev3dev.Motor('outA'); // create new motor plugged into port A called 'motor' |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Might want a link to http://www.ev3dev.org/docs/platform-comparison/ here to get the port names for non-EV3 hardware.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.