How to use a Grove Temperature and Humidity Sensor Pro with a Raspberry Pi

In my previous post, I have explained how to mount a Grove Base Hat onto your Raspberry Pi and install the Seeed Studio provided grove.py software. In this post, I’m going to show you how to use a Grove Temperature and Humidity Sensor Pro with your Raspberry Pi.

Continue reading “How to use a Grove Temperature and Humidity Sensor Pro with a Raspberry Pi”

How to mount a Grove Base Hat for Raspberry Pi

In my previous post, I explained how I have gotten interested in IOT devices lately. I recommend reading it before proceeding with this post as this is the first of a couple of posts that demonstrate how to put the IOT devices on a Raspberry Pi to good use. In this post specifically, I’ll show you how you can mount a Grove Base Hat onto a Raspberry Pi. The whole task should take you about 10 minutes in total.

Note: although I tested and run these sensors on a Raspberry Pi 3B+, they also work for the latest Raspberry Pi Model 4!

Continue reading “How to mount a Grove Base Hat for Raspberry Pi”

How to IOT enable your Raspberry Pi

I started exploring some IOT devices lately. For a while now I wanted to see how easy it is to build some sort of environmental controls and monitoring with a bunch of sensors. I still have some Raspberry Pies lying around doing nothing, so I thought using one of them for that purpose could be quite fitting. Given that the new generations of Raspberry Pies all come with WiFi and run Linux, it should be easy to process the signals and send them off to somewhere else to be stored or to further analyze them. So I started searching for sensors for Raspberry Pies. My goal was to find something that’s not too low-level on the hardware side but easy for others to replicate. After a while of research on the web, I found an interesting set of different Grove sensors from Seeed Studio. The senors are all cheap enough and Seeed Studio provides a rich set of libraries for all of them for Raspberry Pi. Seeed Studio was even kind enough to offer me a $30 voucher for providing reviews on my blog, which you can find in the blog posts at the bottom. The devices I was most curious about, at least to start with, were the Grove – Air quality sensor v1.3 and the Grove – Temperature & Humidity Sensor Pro. Seeed Studio also provides a Grove Base Hat for Raspberry Pi (or Raspberry Pi Zero) which makes it easy to connect the sensors with the GPIO from the Pi at the same time and without much hassle. In the next couple of blog posts, I will go over how I assembled everything together and share the results of my efforts. Stay tuned!

  1. How to mount a Grove Base Hat for Raspberry Pi
  2. How to use a Grove Temperature & Humidity Sensor Pro with a Raspberry Pi (coming soon)
  3. How to use a Grove Air quality sensor v1.3 with a Raspberry Pi (coming soon)

Turning your Raspberry Pi into a science research station via BOINC

Use your computing power for the greater good

BOINC lets you help cutting-edge science research using your computer (Windows, Mac, Linux) or Android device. BOINC downloads scientific computing jobs to your computer and runs them invisibly in the background. It’s easy and safe. https://boinc.berkeley.edu/

This is the entry paragraph on the Berkely University BOINC website. The BOINC software, short for Berkeley Open Infrastructure for Network Computing, can also be installed on Raspberry Pis, making your Raspberry Pi your own little science research station. This way you can help science projects such as SETI@home, Einstein@Home, Universe@Home, and many more.

Continue reading “Turning your Raspberry Pi into a science research station via BOINC”

How to resize a btrfs root partition on Oracle Linux

Resizing a root partition (/) of a running Oracle Linux isn’t hard but the information out there on the web is limited. In my situation, I was given access to an already installed Oracle Linux environment that wasn’t using all the available space of the disk. The root partition, formatted with the btrfs filesystem, only used 4GB when 32GB were available in total.

Resizing the partition is done in two steps:

  1. Resizing the actual partition itself
  2. Expanding the filesystem on top of the partition

Continue reading “How to resize a btrfs root partition on Oracle Linux”

How to install Oracle Database 18c XE on Windows

Get up and running with the free Oracle Database edition on Windows

Oracle Database 18c XE Successful InstallationIn my previous post, I demonstrated how you can install Oracle Database 18c XE on Linux. In this post, you will learn how you can install Oracle Database 18c XE on Windows. I am performing the installation on Windows 10 but it should remain the same for all Windows versions.

Preparing for the installation

Before you can start the installation, you will have to download the Oracle Database 18c XE Windows installer zip file. Head over to https://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html, click on “Accept License Agreement” and download the “Oracle Database 18c Express Edition for Windows x64” zip file.

Oracle 18c XE Download page

Once you have downloaded the zip file, extract it anywhere.

Oracle Database 18c XE extracted folder

Continue reading “How to install Oracle Database 18c XE on Windows”

How to install Oracle Linux on a Raspberry Pi – the easy way

Etcher flashingIn one of my past posts I showed how one can install Oracle Linux on a Raspberry Pi from a Mac via the command line. Luckily my colleague Philippe pointed out to me that things can be even much, much easier thanks to Etcher, an open source tool to flash SD cards and USB drives. Etcher is available for Mac, Linux and Windows, which should make the following steps generic.

tl;dr

  1. Download the latest Oracle Linux image for ARM
  2. Flash your SD card using Etcher
  3. Put the SD card into your Raspberry Pi and boot it up

Continue reading “How to install Oracle Linux on a Raspberry Pi – the easy way”

How to set the date and time on Linux

A quick post for how to set the date and time on Oracle Linux via the date command. This post is more for my own documentation but hey, it might help others as well. To set a date or time you have to pass on the information via a formatted string to the date command. I find calling date twice, once for the date and once for the time, the easiest. The +%D format option allows you to pass on the date as YYYY-MM-DD, e.g. 2019-08-01 for the 1st of August 2019. To set the time, I use the +%T format option to pass on the time as HH24:MI:SS, e.g. 22:31:04.

date +%D -s 2019-08-01
date +%T -s 22:31:04

Format:

date +%D -s YYYY-MM-DD
date +%T -s HH24:MI:SS

How to install Oracle Linux on Raspberry Pi

Did you know that Oracle Linux is also available for ARM processors? That means that you can install Oracle Linux on an SD card for a Raspberry Pi as well. Below I will show you how to do that with a Mac.

tl;dr

  1. Download the latest Oracle Linux image for ARM
  2. Uncompress the image with xz, for example: xz -dkv rpi3-ol7.6-image-20181116.img.xz
  3. Flash the SD card with the Oracle Linux image, using dd, for example: dd if=rpi3-ol7.6-image-20181116.img of=/dev/disk2 bs=16000000
  4. Put the SD card into your Raspberry Pi and boot it up

Continue reading “How to install Oracle Linux on Raspberry Pi”

csv2db – the little CSV command line loader you always wanted

It was over the last holiday season that I wanted to take some time and play around a bit with data. The outcome was rather different than I initially expected. Rather than having worked with the data, I spent a lot of time trying to get some CSV data loaded into a database. I knew that there are great tools such as SQL Developer out there that make loading CSV data trivial, but I wanted something that I could execute via the command line, not requiring a GUI. The simple reason was that I wanted to script the loading part, rather than having to execute some manual, potentially error prone steps whenever loading some data again. Too late I found out, actually just last week, that SQLcl already had what I was after, a load command that does exactly what I wanted:

SQL> help load
LOAD
-----

Loads a comma separated value (csv) file into a table.
The first row of the file must be a header row. The columns in the header row must match the columns defined on the table.

The columns must be delimited by a comma and may optionally be enclosed in double quotes.
Lines can be terminated with standard line terminators for windows, unix or mac.
File must be encoded UTF8.

The load is processed with 50 rows per batch.
If AUTOCOMMIT is set in SQLCL, a commit is done every 10 batches.
The load is terminated if more than 50 errors are found.

LOAD [schema.]table_name[@db_link] file_name

Unfortunately back then Google didn’t offer me this insight when looking for “load csv data into oracle” and so I was stuck with the methods I already knew and that I found as too cumbersome to deal with. After all, all I wanted was a simple tool that loaded data from CSV files into a table and match the column names with the header of the file:

cat people.csv

"first_name","last_name","city"
"Gerald","Venzl","San Francisco"
"Andreas","Pumberger","New York City"

SELECT * FROM PEOPLE

FIRST_NAME  LAST_NAME  CITY
----------  ---------  -------------
Gerald      Venzl      San Francisco
Andreas     Pumberger  New York City

Continue reading “csv2db – the little CSV command line loader you always wanted”