Wiring

Lets start with the 8×8 display:

VCC to Nano 5V (white)

GND to Nano GND (black)

DIN to Nano Digital pin 12 (gray)

CS to Nano Digital pin 10 (purple)

CLK to nano Digital pin 11 (blue)

And then the distance sensor. Since it needs 5V and ground connections too, we’re using the 8×8 LED display’s output pins. They are there to make chaining the 8×8 displays easy, but can be naturally used for other sensors, too. Pin order is same as on the input ones.

VCC to 8×8 LED display VCC out (red)

GND to 8×8 LED display GND out (gray)

Trig to Nano Digital pin 9 (brown)

Echo to Nano Digital pin 8 (purple, again 😉 )

And how they look like on the Nano:

Code

This is my “first draft” code which is still under development (and uses example code for initialization, etc from LedControl examples, etc)..

The code uses LedControl library which can be installed through the compiler or downloaded from here. Note that the pins can be changed if you need to use a different configuration.

For actual use, the delay with water level reading should be set to minutes and any obviously erroneous readings should result into a re-read. (Sometimes the sensor reading will result in the display blanking out until it can get a “good” reading.)