GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Added new getting started guide for node js by liam-b · Pull Request #357 · ev3dev/ev3dev.github.io

Conversation

@liam-b

@liam-b liam-b commented Mar 24, 2017

Copy link
Copy Markdown

No description provided.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@liam-b
Added new getting started guide for node js
5011bb7
@WasabiFan

WasabiFan commented Mar 25, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Sorry about the Travis CI server error; it's currently having some issues. Your page doesn't have any errors. I convinced it to be less angry. The status is green!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

WasabiFan
WasabiFan reviewed Mar 25, 2017
View reviewed changes

@WasabiFan WasabiFan left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread docs/tutorials/getting-started-with-node-js.md Outdated
---

{% 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.

@WasabiFan WasabiFan Mar 25, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run -> runs

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread docs/tutorials/getting-started-with-node-js.md Outdated
---

{% 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.

@WasabiFan WasabiFan Mar 25, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread docs/tutorials/getting-started-with-node-js.md Outdated
---

{% 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.

@WasabiFan WasabiFan Mar 25, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NPM is npm

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread docs/tutorials/getting-started-with-node-js.md Outdated
---

{% 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.

@WasabiFan WasabiFan Mar 25, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread docs/tutorials/getting-started-with-node-js.md Outdated
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

@WasabiFan WasabiFan Mar 25, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread docs/tutorials/getting-started-with-node-js.md Outdated
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)

@WasabiFan WasabiFan Mar 25, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accessor (two Cs)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread docs/tutorials/getting-started-with-node-js.md Outdated
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).

@WasabiFan WasabiFan Mar 25, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove "So"

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread docs/tutorials/getting-started-with-node-js.md Outdated
## 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)

@WasabiFan WasabiFan Mar 25, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ambientLightIntensity etc

should be

ambientLightIntensity, etc.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread docs/tutorials/getting-started-with-node-js.md Outdated

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.

@WasabiFan WasabiFan Mar 25, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really -> extremely

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread docs/tutorials/getting-started-with-node-js.md Outdated

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.

@WasabiFan WasabiFan Mar 25, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aswell -> as well

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@WasabiFan
WasabiFan requested a review from dlech March 25, 2017 00:27
@liam-b
added 'getting started guides' for languages and tooling category
3036fbe
@liam-b

liam-b commented Mar 25, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Author

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,
Liam

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@WasabiFan

WasabiFan commented Mar 25, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Yeah, I'm not the greatest at writing documentation :).

No problem! It's always easier to spot issues as a reviewer than as the original author... You grow blind out of familiarity.

Just a quick question, what other versions are npm limited to? Because it's 0.10.29 on my brick.

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"?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@WasabiFan
Update getting-started-with-node-js.md
90e988b
@WasabiFan

WasabiFan commented Mar 27, 2017

Copy link
Copy Markdown
Member

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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dlech
dlech reviewed Mar 27, 2017
View reviewed changes
Comment thread docs/tutorials/getting-started-with-node-js.md Outdated

{% 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.

@dlech dlech Mar 27, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
dlech
dlech reviewed Mar 27, 2017
View reviewed changes
Comment thread _data/tutorial-groups.yml
- 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."

@dlech dlech Mar 27, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
dlech
dlech reviewed Mar 27, 2017
View reviewed changes
Comment thread docs/tutorials/getting-started-with-node-js.md

<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>

@dlech dlech Mar 27, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
dlech
dlech reviewed Mar 27, 2017
View reviewed changes
Comment thread docs/tutorials/getting-started-with-node-js.md
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

@dlech dlech Mar 27, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
dlech
dlech reviewed Mar 27, 2017
View reviewed changes
Comment thread docs/tutorials/getting-started-with-node-js.md
```javascript
var ev3dev = require('ev3dev-lang');

var motor = new ev3dev.Motor('outA'); // create new motor plugged into port A called 'motor'

@dlech dlech Mar 27, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@liam-b
added node and npm versions
4f19dbb
@dlech
dlech force-pushed the master branch from a126dfd to 536a64c Compare June 14, 2018 18:33

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dlech dlech dlech left review comments
@WasabiFan WasabiFan WasabiFan left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@liam-b @WasabiFan @dlech
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.