You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 20, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+15-17Lines changed: 15 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,38 +37,32 @@ Reach out to the [community](https://mbientlab.com/community/) if you encounter
37
37
38
38
## Getting Started
39
39
40
-
### Installation
41
-
42
-
#### Requirements
40
+
### Pre-Installation
43
41
44
-
##### 0. Node and NPM
42
+
#### Node and NPM
45
43
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.
46
44
47
45
We are currently supporting Node 10.23.0. Here are steps to install Node on Linux (Ubuntu). You have 3 options:
48
46
49
-
1. You can install Node from the repositories:
47
+
##### 1. You can install Node from the repositories:
50
48
```
51
49
sudo apt install nodejs
52
50
sudo apt install npm
53
51
nodejs -v
54
52
```
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.
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.
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.
81
75
76
+
##### Using sudo
82
77
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.
83
78
84
79
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
90
85
```
91
86
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).
92
87
88
+
### Installation
89
+
93
90
You have two options for installation:
94
91
95
-
#####1. Use NPM
92
+
#### 1. Use NPM
96
93
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.
97
94
98
95
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
102
99
Then you can simply install the MetaWear package lib with NPM using the command line:
103
100
```javascript
104
101
npm install metawear
102
+
npm update metawear
105
103
```
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.
107
105
108
-
#####2. Use our Repository
106
+
#### 2. Use our Repository
109
107
We packaged everything for you already in this repository with the package.json file ready to be installed with npm.
110
108
111
109
Make sure that when you clone this repository, that you clone the submodule with it.
@@ -140,7 +138,7 @@ Simply change it to this:
140
138
var MetaWear =require('metawear');
141
139
```
142
140
143
-
#####Notes
141
+
#### Notes
144
142
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.
0 commit comments