Steps to manually install Pi4J

273 views
Skip to first unread message

Robert Savage

unread,
Jan 1, 2013, 7:30:45 PM1/1/13
to
First make sure that an existing pi4J folder/files does not exist on the file system:

sudo rm -r /opt/pi4j

Next, download the installer ZIP file from the Google code project site (http://code.google.com/p/pi4j/downloads/list): 
 
cd ~ 
wget http://pi4j.googlecode.com/files/pi4j-0.0.4.zip  << make sure to download the correct version 

Execute the following commands to extract the zip contents and setup the correct permissions on these files.
(Note: make sure to use the correct version number based on your download in the commands below.)

sudo unzip pi4j-0.0.4.zip -d /opt
sudo mv /opt/pi4j-0.0.4/ /opt/pi4j
sudo mv /opt/pi4j/libs/ /opt/pi4j/lib
sudo chmod 777 /opt/pi4j/examples
sudo chmod 666 /opt/pi4j/examples/*
sudo chmod 777 /opt/pi4j/examples/build

Finally, if you want to you can build all the examples using the following command:
(Note: you must have a JDK installed.)

/opt/pi4j/examples/build
Reply all
Reply to author
Forward
0 new messages