Today I have completed the initial set up of my RPi A+. Wow that took a while. I needed a specific set of tools ready on the device:
- Network connected via WiFi
- Basic Apache install to host the Client interface page
- Basic FTP to simplify uploading code and files
- Node JS to run the Wow Suit software
- Node-SPI module to enable NodeJS to use the SPI port on the device
Installing and configuring Node and the SPI modules was the MOST difficult part. I was initially planning on using the MRAA module, but it has so many prerequisites and build failures that i bailed on it. I may go back to it if the current node module I’m using does not suffice.
This post was by the far the only advise that worked on the A+ board. I initially attempted to compile the latest version of NodeJS directly but the board kept crashing mid way. So I’m copying the instructions here for anyone else and for future reference for myself:
Update apt-get sudo apt-get update Upgrade apt-get sudo apt-get upgrade Download the latest node build wget http://node-arm.herokuapp.com/node_latest_armhf.deb Install the package using dpkg sudo dpkg -i node_latest_armhf.deb Test Node and NPM node -v npm -v
At this point Node works perfectly as well as npm. Now on to the next issue. SPI!
This is the “pi-spi” nodejs module. It is the ONLY one that would compile and run. I have not yet tested that it works as I’m at the office, but its good to know that it compiles and runs!
Rendering a Line in a 2D bitmap…who would have thought that was hard? Here is some code I hacked up from the Rosetta archive lineTest