-
Notifications
You must be signed in to change notification settings - Fork 0
Raspberry Pi tips and tricks
-
sudo apt-get update
-
sudo apt-get upgrade
-
sudo rpi-update
-
Installing Java 8 on Raspberry Pi:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html, click the download button of Java Platform (JDK) 8. Click to Accept License Agreement, download jdk-8-linux-arm-vfp-hflt.tar.gz for Linux ARM v6/v7 Hard Float ABI.
Log-in Raspberry Pi, enter the command to extract jdk-8-linux-arm-vfp-hflt.tar.gz to /opt directory.
$ sudo tar zxvf jdk-8-linux-arm-vfp-hflt.tar.gz -C /opt
Set default java and javac to the new installed jdk8.
$ sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0/bin/javac 1 $ sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0/bin/java 1
$ sudo update-alternatives --config javac $ sudo update-alternatives --config java
After all, verify with the commands with -verion option.
$ java -version $ javac -version
Add this line last in .bashrc
export PATH=$PATH:$JAVA_HOME/bin
And this line in /etc/environment
export JAVA_HOME="/opt/jdk1.8.0_65"
echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
gpg --keyserver pgpkeys.mit.edu --recv-key 8B48AD6246925553
gpg -a --export 8B48AD6246925553 | sudo apt-key add -
gpg --keyserver pgpkeys.mit.edu --recv-key 7638D0442B90D010
gpg -a --export 7638D0442B90D010 | sudo apt-key add -
apt-get -t jessie-backports install openjdk-8-jre-headless
-
Insert the card in your Mac SD card reader (must work on Window too);
-
Edit the file “cmdline.txt” and append “init=/bin/sh” (thanks Joe Schmoe). The Rpi will boot in single user mode;
-
Insert the card in the RPi again and boot up;
-
When prompt available, enter “su” to log as root (with no password);
-
Type “passwd pi” and enter a new password;
-
Remember the new password;
-
Remove the appended string in the “cmdfile.txt” file. Voila!
-
apt-get install ntpdate
-
edit /etc/rc.local, insert:
( /etc/init.d/ntp stop until ping -nq -c3 8.8.8.8; do echo "Waiting for network..." done ntpdate -s time.nist.gov /etc/init.d/ntp start )&
AbioWire+ manual I found here.
-
Comment out blacklisted device-drivers that we need.
sudo nano /etc/modprobe.d/raspi-blacklist.conf
And make sure you comment out the line "blacklist i2c-bcm2708" (if they exists) so that it looks like
#blacklist i2c-bcm2708
-
Add i2c-dev to the end of /etc/modules file if it's not already listed.
sudo nano /etc/modules
Add these
i2c_dev
i2c-bcm2708
-
Activate support for i2c in the kernel
sudo nano /boot/config.txt
Add these two lines at the bottom
dtparam=i2c1=on
dtparam=i2c_arm=on
-
Reboot the system
sudo reboot
-
Install packages
sudo apt-get update
sudo apt-get install i2c-tools owserver
(ignore any errors owserver might throw when trying to start.)
-
Test i2c interface to see if we could detect the hardware
sudo i2cdetect -y 1
(it will show you a table of detected i2c-busses, if ALL are displaying "--" then no hardware was found)
-
Edit OWFS config-file
sudo nano /etc/owfs.conf
(TODO: add more info here!) -
Check that owserver is listening on port: sudo netstat -tulpn |grep owserver
http://www.pihlgren.se/raspberrypi-wifi.php
/opt/vc/bin/tvservice -off