Skip to content

schnogz/razpi-electron-btc-ticker

Repository files navigation

Bitcoin Stats Electron App

Overview

An Electron application built specifically for a Raspberry Pi 3 running a 7" display but can be easily modified for other displays and operating systems. The backend is powered by Node.js v6.9 and Express. The frontend is built using Angular 1.5 and Angular Material. All data is from the Blockchain.info API.

You can find detailed information about this project via my blog posts below.

  • Part 1 - Setting up the Raspberry Pi
  • Part 2 - Electron overview & server side code
  • Part 3 - Frontend code & autostart guide

Setup & Local Development

  1. Install Node.js >= v6.9.5. (Using NVM is recommended)
  2. npm install
  3. bower install
  4. npm start to launch the application in development mode with Chromium's developer tools opened

NOTE: If you plan to make large amounts of requests to Blockchain.info, request an API code here and enter your personal API code in controllers/apiCode.js

Running on Raspberry Pi

It is currently not possible, or at least easy, to create an electron installer targeted for Linux ARM. See this electron-builder issue for more information.

If you wish instead to autostart this app during the Pi's startup follow these steps.

  1. Clone this repo to your Pi
  2. Run npm install && bower install
  3. Modify line 5 of btc-autostart.sh to cd into the root directory of your cloned app
  4. As root run the following commands to make the btc-autostart.sh executable
  sudo chown pi:pi /path/to/btc-autostart.sh
  sudo chmod +x /path/to/btc-autostart.sh
  1. Edit your Pi's LXDE autostart.sh file to run this applications btc-autostart.sh file
  sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart.sh
  1. At the end of this file add a line pointing to this applications btc-autostart.sh file
  /path/to/btx-autostart.sh
  1. Save and exit the file
  Ctrl + X, Y, Enter
  1. Restart your Pi and the app should now automatically start

Application Screenshot

screenshot