Raspberry Pi App
A Java based, Raspberry Pi App that sends data to authenticated Google App Engine Cloud Endpoint application. The data is then displayed on a real time dashboard.
- A Raspberry Pi Zero or Model B.
- Assemble the hardware components on a breadboard by following the blog post.
- Alternatively my friend Lez has created populated and bare boards for the hardware which you can purchase on his Website.
- (Optional) Install Apache Maven on the Raspberry Pi if you want to build the project on the Pi itself.
- Make sure git and Java are installed on the Pi.
- Install Pi4J library on the Pi.
- Ensure the SPI interface is enabled.
- Start a shell on the Pi.
- Checkout the project
git clone https://github.com/omerio/raspberrypi-app.git.
- Update the client_secret.json file with your client_id and client_secret.
- Compile the project
cd raspberrypi-app && mvn clean package, once built the RaspberryPiApp.jar will be available inside the dist folder
- Run the application
sudo java -jar RaspberryPiApp.jar. On first start the app will prompt you to copy and paste a link in your browser. Navigate to the URL and accept the Google Accounts permission request. It will give you a code that you can copy and paste into the command line prompt.
- On subsequent starts of the application you can use the
- To kill the app do
ps -ef | grep javaand note the pid id then do a 'sudo kill pid-id'
- Optionally you can get the RaspberryPiApp.jar to run by default whenever the Pi starts:
sudo cp runapp.sh /etc/init.d/piapp sudo update-rc.d piapp defaults