-
Notifications
You must be signed in to change notification settings - Fork 0
Home
##Welcome to SerialPort Land
Welcome to the fun world of hardware hacking without leaving the comfort of your favorite programming language, JS! We are trying to assemble all of various FAQs revolving around this library here, so please ask and help out. The library does utilize native code so it does require build tools to be present in order to install, this is different from most other modules in NPM and general node.js. Due to this difference, we are fully aware that installing it can be a bit of a bear, please use these guides to help get you up and running.
On Windows 7 and above, please use the following instructions. We are assuming from a vanilla Windows installation so your mileage may vary depending on things you already have installed. If you find conflicts, please let us know via a GitHub Issue
- Starting with a vanilla Windows 7 (or higher, should be fine) installation
- Download and Install the free Windows SDK 7.1 and select every option (you can unselect options if you absolutely know what you are doing by unselecting them, but it is easier just to select all options).
- Install node.js 0.10.12+ using the preferred compiler settings, either 32-bit or 64-bit. Those are Microsoft Installer (MSI) format, if you prefer .exe binaries, please obtain those from here. Default settings are perfect.
- Install Python 2.7.5 for any questions, please refer to their FAQ. Default settings are perfect.
- Open the Windows SDK 7.1 Command prompt (this allows the C++ compiler to be available on the path).
- Enter the following command in the prompt which adds Python to the path (the Python installed doesn't do this for you).
set path=%path%;C:\Python27
- Enter the following command in the prompt to install serialport for you!
npm install serialport
- Starting with a a vanilla New Out of the Box Software (NOOBS) Raspbian image (currently tested: 5/25/2013)
- Log into your Raspberry Pi through whatever means works best and ensure you are on a terminal prompt for the remaining steps. This could be local or through an SSH (or a serial connection if you like).
- Issue the following commands to ensure you are up to date:
sudo apt-get update sudo apt-get upgrade -y
- Download and install node.js:
wget http://nodejs.org/dist/v0.10.12/node-v0.10.12-linux-arm-pi.tar.gz tar xvfz node-v0.10.12-linux-arm-pi.tar.gz sudo mv node-v0.10.12-linux-arm-pi /opt/node/
- Set up your paths correctly:
echo 'export PATH="$PATH:/opt/node/bin"' >> ~/.bashrc source ~/.bashrc
- Install using npm, note this will take a while as it is actually compiling code and that ARM processor is getting a workout.
npm install serialport