Open Source Detective

Building the History Cube: Part Two Configuring the Raspberry Pi

Cover Image for Building the History Cube: Part Two Configuring the Raspberry Pi
Open Source Detective

Introduction

Combining my passion for coding, 3D printing, and hardware, the History Cube project emerged as a fusion of digital and tangible creation. This project seeks to create a compact device delivering history facts through a terminal app. Join me on this journey as we delve into the coding, configurations of the Raspberry Pi Zero, and crafting a 3D-printed casing. For this part of the series I’m going to configure the Raspberry Pi Zero to launch straight into the history terminal app.

Prerequisites

  • Raspberry Pi Zero — We will be using a Raspberry Pi Zero for this project because of it’s small profile and low power consumption. It’ll be easier to 3D Print a case as well that fits a screen and the Raspberry Pi itself.
  • Raspberry Pi Imager — To flash a version of Raspberry Pi OS to your micro SD card.
  • Monitor — You’ll need a monitor to hook your Raspberry Pi to in order to do the initial setup.
  • Keyboard — You’ll need to hook up a keyboard intially to your Raspberry Pi in order to start the configuration. After setup I turned on SSH so I could work on it over my network, but either way works.

Steps:

Install Raspberry Pi OS on the Raspberry Pi Zero:

For this step you’ll need your Raspberry Pi, a Micro SD card and the Raspberry Pi Imager. If you need a crash course on this go here: https://www.raspberrypi.com/software/

Flash the following Raspberry Pi OS on the SD Card with the 'Raspberry Pi OS Lite' version.

Install Ruby:

Once you’ve installed the Raspberry Pi OS and got a monitor and keyboard setup. you’ll need to install ruby on the Raspberry Pi. I used the following instructions to do so: https://dev.to/konyu/installing-the-latest-version-of-ruby-on-raspberry-pi-3ofk

Install GIT:

In order to to pull the history api project you’ll need GIT installed. For this simply run the following commands:

sudo apt update
sudo apt install git

GIT Clone

Clone the code to your Raspberry Pi:

git clone https://github.com/mawittenauer/history_cube.git

Follow README installation instructions

The git repository contains instructions on how to install the terminal app and run it. Follow those and move on to the next instruction.

Setup the Raspberry Pi to launch the ruby history cube Terminal App on startup

For this I used a cron job. Run the following commands:

crontab -e

Add the following command to the bottom of the crontab file:

@reboot cd [history_cube directory] && ruby index.rb

Conclusion

Following these instructions will get you one step closer to completing the history cube project. We’ve successfully configured our raspberry pi to run the history cube terminal app at startup. Here’s a link to the previous tutorial about the code itself: https://www.opensourcedetective.com/posts/building-the-history-cube-part-one-ruby-terminal-app


More Stories

Cover Image for Tutorial: Pentesting Device with Raspberry Pi Zero

Tutorial: Pentesting Device with Raspberry Pi Zero

Lately I’ve been more and more interested in pentesting and cyber security. To continue my deep dive into the topic I’m going to create a pentesting device out of a Raspberry Pi Zero. A few requirements I want to fulfill. First, I’d like to be able to run many of the commands that you can run in Linux. Second, I’d like it to be battery powered and attach my iPhone to it to run commands. Essentially I’d like to be able to carry the device in my pocket and operate it with my iPhone.

Open Source Detective
Cover Image for Local DNS Server with Pi-Hole

Local DNS Server with Pi-Hole

Recently, I’ve been developing some websites to run on my local network and wanted to create my own DNS server. After some research I realized that building my own custom server would be a lot more work than I wanted to undertake. After a little more searching I came across Pi-Hole which offered a much quicker solution.

Open Source Detective