Forging on Ardor Blockchain using a Raspberry Pi3 model B, with an LCD. Etienne Okeke Follow Apr 20 · 5 min read

The is no doubt that the Blockchain is a collect of tools, principles and technologies. In this article, I write to give you a step by step guide on how one can set up an aArdor forging node on a Raspberry Pi3 model B and then have the running node display on its LCD screen. One can also connect internet through a modem instead of using the WiFi.

The client of an Ardor node allows you to run your node on a forging mood using your PC but the issue with this is that you will not want to leave you PC on all the time. Leaving your laptop on all the time can lead to some hardware damage of parts like the battery. Note, the client is connecting to the node using HTTP APIs. On this note, one will have to get a minimal computer which can handle the best case demand of an Ardor node. This includes fast computation, can staying online for a long period of time and is energy efficient. Considering the proof of stake consensus implementation of the Ardor Network, Raspberry Pis are the most readily and affordable option.

What you will need for the Set-up includes:

Raspberry Pi3 model B

16GB MicroSD Card (Ultra SanDisk, Type 10)

Power Supply: Power Bank (30,000mAH) or a Solar Power source.

Raspberry LCD Screen Display (3.5” or 5”)

USB cable (class B)

An external keyboard, HDMI cable and a mouse (Optional).

Note: Depending on what you have at home or what you really want to achieve, this list can be altered. Also, you can buy all this items on AliExpress.

Setting-up the SD Card

With the above components and devices ready, you are good to go. Firstly, one will need to setup the SD Card using the Raspbian OS which is a Linux based OS . You can download the Raspbian Stretch with desktop and recommended software version from the website and install the image using Etcher. In very basic step you can install the image by:

Downloading both the Raspbian and the Etcher into your PC.

Install the Etcher into your PC and open it.

Connect the SD card to the PC using a Card Reader

Search for the SD card in the Etcher and Select the downloaded Raspbian Image

Select the SD card drive and

Flash the SD card.

Enable SSH

To be able to start up the Raspberry Pi one can enable the SSH by creating an empty file named ssh on the boot partition of the SD card and you are done with this.

Configure Wi-Fi Settings

You will need to create a file, wpa_supplicant.conf. In some boot partitions, they already have a wpa_supplicant folder. You can move into this folder before you create the wpa_supplicant.conf or you just create the file on the boot partition. You will need to add the following information in this new file:

country=XX ctrl_interface=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="YOUR_SSID" psk="YOUR_PASSWORD" }

Where you will have to set XX to your Country Code, and set your WiFi SSID and WiFi password.

Connecting with the Raspberry

In a case where there is no external display for the Raspberry Pi, you can use PuTTY for gaining remote access from your PC to the Raspberry Pi. Power the Raspberry Pi by connecting it through the USB cable to your PC and make sure that your PC and the Raspberry pi is connected to the same WiFi. Open up the PuTTY client and connect with the IP raspberry@local then use the default password from the Raspberry manual (to login as: pi use the password: raspberry). Through the terminal, change the password by running:

Passwd and input a new password.

The console should say passwd: password updated successfully when the password has been updated. You will have to disconnect and reconnect again. Then try out the new login details. Now you have to update the Raspbian packages to make sure you have up-to-date packages.

sudo apt-get update -y sudo apt-get upgrade -y

Installing Ardor on the Raspberry Pi

It is now time for us to install the Ardor Client on the Raspbian OS. This step is achieved by first of all installing Java (JDK 8 or 11) on the Raspberry Pi with:

sudo apt-get purge openjdk-8-jre-headless -y sudo apt-get install openjdk-8-jre-headless -y sudo apt-get install openjdk-8-jre screen -y

Secondly, browsing the internet on the raspberry Pi, you download the ardor node software from the Jelurida Website and unzip it:

wget https://www.jelurida.com/ardor-client.zip unzip ardor-client.zip

move into the ardor folder with

cd ardor

Now that you have moved into the Ardor folder, download the database Zip file and unzip it with:

wget https://ardor.tools/ardorTest.h2.db.zip unzip ardorTest.h2.db.zip

This is a fast way to enable the Ardor Blockchain to sync super fast and it reduces your start-up time.

Note: If this is the first time you are trying to starting up this new node software run ./compile.sh.

You can startup the Ardor blockchain/server, simply running

./run.sh

This running online Server will you to set up the Display screen.

Display Configuration

The Raspberry Pi3 model B can only display through the HDMI cable or through the Raspberry LCD display. It can not display both ways. This means that you will have to do some more coding to configure the LCD screen since the HDMI is set to default.

Reconnect the Raspberry Pi to your PC and make sure it is connected to the internet. Then use PuTTY to access the Raspberry Pi as described above. Having login into the Raspberry Pi, you will have to now run these LCD display codes in order to activate the display:

sudo rm -rf LCD-show git clone https://github.com/goodtft/LCD-show.git chmod -R 755 LCD-show cd LCD-show/ sudo ./LCD35-show

At the point of the last command, hit that enter key and you will see the Raspberry Pi restart and after the restart, the Display will show the desktop windows on the Raspberry Pi. This shows that the Raspberry Display is now active. But in case you want to revert the screen back to the HDMI, just move into the LCD-show folder,

cd LCD-show

and run

sudo ./LCD-hdmi

This will restate the Raspberry Pi and the display will go back to the HDMI port.

Conclusion

At this point you now have your raspberry Pi hosting the ardor server on localhost at http://localhost:27876/index.html#. You can now set-up your account and fund it with not less than 1000ARDR. You will have to wait for 1440 blocks so that your funds will have to become your effective balance, and your node is ready to forge and secure the Ardor Network.

References

Note: Effective Balance is a defense mechanism which the Ardor Protocol uses to defend against users having to switch one account funds and thereby forging on different account with the same funds at very short time intervals.