Skip to content
This repository was archived by the owner on Jul 20, 2025. It is now read-only.

Commit 71bf920

Browse files
committed
update readme
1 parent 9b4eea1 commit 71bf920

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

README.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,38 +37,32 @@ Reach out to the [community](https://mbientlab.com/community/) if you encounter
3737

3838
## Getting Started
3939

40-
### Installation
41-
42-
#### Requirements
40+
### Pre-Installation
4341

44-
##### 0. Node and NPM
42+
#### Node and NPM
4543
You need to make sure you have node and npm installed on your machine. Here's a quick rundown but you should google-fu proper steps for your specific OS and Node version.
4644

4745
We are currently supporting Node 10.23.0. Here are steps to install Node on Linux (Ubuntu). You have 3 options:
4846

49-
1. You can install Node from the repositories:
47+
##### 1. You can install Node from the repositories:
5048
```
5149
sudo apt install nodejs
5250
sudo apt install npm
5351
nodejs -v
5452
```
55-
This will install the latest Node.
56-
57-
You may need to alias nodejs to node.
53+
This will install the latest Node. You may need to alias nodejs to node.
5854

59-
2. You can install Node from a PPA:
55+
##### 2. You can install Node from a PPA:
6056
```
6157
cd ~
6258
curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh
6359
sudo bash nodesource_setup.sh
6460
sudo apt install nodejs
6561
nodejs -v
6662
```
67-
This will install node v10.23.0 (latest stable release of node 10). You can replace the 10 with 12 if you want to install node 12.
63+
This will install node v10.23.0 (latest stable release of node 10). You can replace the 10 with 12 if you want to install node 12. You may need to alias nodejs to node.
6864

69-
You may need to alias nodejs to node.
70-
71-
3. Using NVM (my preferred method):
65+
##### 3. Using NVM (preferred method):
7266
```
7367
curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.35.3/install.sh -o install_nvm.sh
7468
bash install_nvm.sh
@@ -79,6 +73,7 @@ node -v
7973
```
8074
Check the latest version of NVM before you install (it might be higher than v0.35.3). You can go online to learn how to use NVM to switch node versions on the fly.
8175

76+
##### Using sudo
8277
It is important to note that because our scripts use the Bluetooth libraries of the OS, it is required to use sudo (or you will get a warning and the scripts won't work). You need to decide if you are ok to use sudo or not.
8378

8479
You also need to check that the version of node you are using is as expected for sudo:
@@ -90,9 +85,11 @@ v0.11.8-pre
9085
```
9186
As you can see here, the sudo node version is not the same as the current user version. Here's a [workaround](https://stackoverflow.com/questions/21215059/cant-use-nvm-from-root-or-sudo).
9287

88+
### Installation
89+
9390
You have two options for installation:
9491

95-
##### 1. Use NPM
92+
#### 1. Use NPM
9693
The Mbient JavaScript SDK relies on [Noble](https://github.com/mbientlab/noble) and [Noble-Device](https://github.com/mbientlab/noble-device) for Bluetooth Low Energy communications.
9794

9895
You need to setup the relevant [prerequisites for Noble](https://github.com/mbientlab/noble#prerequisites) and then [install Noble](https://github.com/mbientlab/noble#install).
@@ -102,10 +99,11 @@ Make sure you use our versions of these libraries as the original packages have
10299
Then you can simply install the MetaWear package lib with NPM using the command line:
103100
```javascript
104101
npm install metawear
102+
npm update metawear
105103
```
106-
This step takes a long time as all the packages are installed and the MetaWear CPP library will be compiled on your machine.
104+
This step takes a long time as all the packages are installed and the MetaWear CPP library will be compiled on your machine. You may or may not need to update.
107105

108-
##### 2. Use our Repository
106+
#### 2. Use our Repository
109107
We packaged everything for you already in this repository with the package.json file ready to be installed with npm.
110108

111109
Make sure that when you clone this repository, that you clone the submodule with it.
@@ -140,7 +138,7 @@ Simply change it to this:
140138
var MetaWear = require('metawear');
141139
```
142140

143-
##### Notes
141+
#### Notes
144142
You should familiarize yourself with this README and our tutorials since there a few limitiations and other gotchas spelled out, such as the maximum number of simultaneous Bluetooth connections.
145143

146144
### Usage

0 commit comments

Comments
 (0)