Other Projects

Banana Pi + CT Ewell Case (Part 2 - DS18B20)

8 7708
Edited by actkk2000 at 2014-10-22 01:03

This is an update for http://forum.lemaker.org/2897-1-1-banana_pi_ct_ewell_case.html
Continuing the build of BPI, I wanted to also add a LED character display like in my RPI.

For the usb LCD character display, I had this one in RPI:
But since the store is closed, I moved to SureElectronics and I chose a display with blue backlight, to match BPI color (http://store.sure-electronics.com/led/led-display/de-lp14112)
Of course with lcdproc (http://www.lcdproc.org/) you can also have a clock, and I tried, but still I am huge fan of LEDs...

For RPI I used a Clockatoo board (http://www.geekroo.com/271), but that one just comes in red...
So in order to match colors and since I always wanted to try something from Adafruit, I bought this I2C LED character display:
They have excelent tutorials as well:

I decided to put it inside the case with hard drive, but the room for the little backpack board was not enough.
Then I had to split the mounting with a flat cable that I built to communicate display with backpack.
The display will be at front, but backpack will be inside screwed inside to the top of the case.

In order the I2C interface worked on BPI, I changed bus number to 2 instead of 1 in "Adafruit_I2C.py"
  1. def getPiI2CBusNumber():
  2.   # Gets the I2C bus number /dev/i2c#
  3.   return 2 if Adafruit_I2C.getPiRevision() > 1 else 0
Copy the Code
Once mounted I started with a clock, just like in RPI. But in RPI it also displays CPU temperature every 10 minutes.
Fortunately for BPI, since Raspbian 3.1 is also possible to read CPU temperature, otherwise that feature would not be possible.
Here a sample of how to do it with Python:

Then added these lines to display letters as well and not just numbers in "Adafruit_7Segment.py":
  1.   # Basic text lookup table ( a-z, -, _ space, 0-9 ), lowercase only
  2.   letters = { 'a':0x77, 'b':0x7c, 'c':0x39, 'd':0x5e, 'e':0x79, 'f':0x71, \
  3.               'g':0x3d, 'h':0x74, 'i':0x06, 'j':0x1e, 'k':0x75, 'l':0x38, \
  4.               'm':0x15, 'n':0x54, 'o':0x5c, 'p':0x73, 'q':0x67, 'r':0x50, \
  5.               's':0x6d, 't':0x78, 'u':0x3e, 'v':0x1c, 'w':0x2a, 'x':0x76, \
  6.               'y':0x66, 'z':0x5b, '0':0x3f, '1':0x30, '2':0x5b, '3':0x4f, \
  7.               '4':0x66, '5':0x6d, '6':0x7d, '7':0x07, '8':0x7f, '9':0x6f, \
  8.               ' ':0x00, '-':0x40, '_':0x08, '.':0x80 ,'=':0x48, '!':0x82, \
  9.               '?':0x53, '"':0x22 }
Copy the Code
Finally I also wanted to try temperature measure with a Dallas DS18b20 sensor.
I didn't implemented on RPI, so that was really uncharted territory...

Fortunately I had two DS18b20 that I received as a free sample from MaximIntegrated but never used:

Using this tutorial I managed to adapt the sensor to BPI with a switch key:

I further explained all this for temperature here:

And finally, a little detail I almost forgot, to print Lemaker logo to cover Cubietech logo

See some pictures of progress at next:

And a couple videos with RPI as well (click on each one to see):

Until next update!
Thx! I am very flattered...

Very nice.  You had lots of fun then.

Reply 2# Raymond

You have no idea!


My BPi is lying on my desk exposed...couldn't even muster up a case for it.

So cool. You are really highly efficient.

Edited by actkk2000 at Mon Oct 27, 2014 00:37

Here some more:
http://forum.lemaker.org/thread- ... art_4_lapdock_.html

You have to log in before you can reply Login | Sign Up

Points Rules