Useful when starting with a Raspberry PI with NodeJS

Every time I get a new Raspi and I want to use NodeJS on it I need to do the same things earlier or later for that purpose I create a list here. The references can be found at the end.

# Update the PI's OS and its packages 
sudo apt-get update && sudo apt-get dist-upgrade  
sudo rpi-update  

# Start something on startup
sudo nano /etc/rc.local

# Set up remote desktop
sudo apt-get install xrdp

# Set up the right resolution (to be put to the HDMI mode uncomment section)
sudo nano /boot/config.txt 
hdmi_group=1 
hdmi_mode=16

# Install Node.js on PI
wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb
# Test it with (restart Terminal if needed)
node -v
# If the nodejs-legacy conflicts
sudo apt-get remove nodejs nodejs-legacy
# After it you may need to do the followings
sudo apt-get update
sudo apt-get install node-gyp
# Edit the /usr/include/nodejs/deps/v8/include/v8.h file as described here https://github.com/fivdi/onoff/wiki/Node.js-v0.10.29-and-native-addons-on-the-Raspberry-Pi

# In case of necessity
sudo npm install onoff
# In case of necessity
sudo npm install -g node-gyp
# In case of necessity
sudo npm install node-dht-sensor

References

http://www.linuxx.eu/2014/07/mmal-mmalvccomponentenable-failed-to.html
https://coderwall.com/p/ezb3aw/node-garagepi-the-garage-door-opener-using-node-js
https://www.jeremymorgan.com/tutorials/raspberry-pi/how-to-remote-desktop-raspberry-pi/
https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=130217

Further useful links for reading
https://weblogs.asp.net/bleroy/getting-your-raspberry-pi-to-output-the-right-resolution

Auto Running Programs-Command Line

Advertisements

About Tamas Nemeth

Husband and proud father of two daughters in Nürnberg. I'm working as a Senior Software Developer and an enthusiastic Clean-Coder. I spend most of my free time with my family (playing, hiking, etc...). I also play table-tennis and badminton sometimes...
This entry was posted in Technical Interest and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s