Skip to content

omerio/raspberrypi-app

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

Alt text

Live Demo

Overall Architecture

Alt text

Documentation

Hardware Prerequisites

  • 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.

Alt text

Software Prerequisites

  • (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.

Setup Instructions

  1. Start a shell on the Pi.
  2. Checkout the project git clone https://github.com/omerio/raspberrypi-app.git.
  3. Update the client_secret.json file with your client_id and client_secret.
  4. Compile the project cd raspberrypi-app && mvn clean package, once built the RaspberryPiApp.jar will be available inside the dist folder
  5. Run the application cd dist then 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.
  6. On subsequent starts of the application you can use the runapp.sh script.
  7. To kill the app do ps -ef | grep java and note the pid id then do a 'sudo kill pid-id'
  8. 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

About

A Raspberry Pi Java App that talks to authenticated Google App Engine Cloud Endpoint

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published