Showing posts with label Raspberry Pi. Show all posts
Showing posts with label Raspberry Pi. Show all posts

Wednesday, August 01, 2018

A quick and bad Raspberry Pi 3 32-bit & 64-bit OpenSSL speed test

I wanted to make a quick test if there is difference or not as the Pi people keeps telling us that there isn't or not large enough to support a native 64-bit userland.

And there seems to be, but, this test is very bad in multiple ways. Different versions of just about everything was used (glibc for 32-bit, musl for 64-bit, different gcc versions for building, etc) and also because raspbian is built for armv6 it will loose from the start.

These are just preliminary finds so take them with a grain of salt. Still, interesting...

OpenSSL

OpenSSL hmac(md5) speed test comparing 32-bit and 64-bit build

OpenSSL sha512 speed test comparing 32-bit and 64-bit builds

UnixBench test: 


whetstone-double
32-bit: MWIPS 1038.823
64-bit: MWIPS 1379.241


Wednesday, June 06, 2018

Grab H.264 video on Raspberry Pi with gstreamer

(More like a note to self this.)

Load Video4Linux driver:

sudo modprobe bcm2835-v4l2

Grab some video into Matroska container:

gst-launch-1.0 v4l2src ! video/x-h264,framerate=30/1 ! h264parse ! matroskamux ! filesink location=test.mkv

In Full HD:


gst-launch-1.0 v4l2src ! video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse ! matroskamux ! filesink location=test.mkv


Tuesday, August 18, 2015

Custom Raspberry Pi Compute module carrier board

Yet another project I'm involved in using a custom Compute Module carrier. Not by me, I just do the software part.


The board features 4 LEDs in various colors with light pipes and a connector for character LCD. HDMI and audio has been removed. Hand soldered.

The maker of this board, Hasseb, has a ready made carrier board available for 139€. A quick look video of this board+enclosure below:


Thursday, July 30, 2015

Qml item state undefined

I'm working on a info screen application done in Qml that will be run on a Raspberry Pi. I'm doing the main coding on the desktop and everything runs well.

On the Pi I'm using a self build of Qt 5.4.2 and it worked very well, until yesterday that is. Suddenly I got no display of my info slides. Strange thing, it worked perfeclt fine before.

After a good bit of cursing I found that my Image didn't show, because for some odd reason the binding of

visible: root.state=='rotating'

was evaluated as false. Well, how the hell is that possible was the next question. And debug output of the state randomly said "undefined", eh ?? WTF!?

What I don't understand is how it suddenly crept up as I've used states before too in my app. Anyway, it turns out that it is a known bug (QTBUG-41649) in gcc-4.6 on arm that miss compiles a specific file in the Qml library.

 Fix applied and all seems well. I hope.

Friday, October 17, 2014

Raspberry Pi doing i2c LCD display in C++

I'm working on a Raspberry Pi project that needs to be running headless but still be able to communicate with the outside world in some way. We are currently using a simple Red (error), Yellow (waiting for something), Green (Ok) (+blinking) to inform the user of various conditions (you can see them in the picture).

For most features that seem to be ok, but we are thinking about having somekind of display for a bit more details. A cheap 16x1/16x2 display would work quite nicely I think.

Today inspiration hit me to look into that a bit more. I had a 16x1 LCD laying around and a PCF8574T i2c I/O-expander backpack. Wired it up to the Raspberry Pi and started to look for some (proper aka C++) code. No luck there. Just some silly python this and python that. meh.
Well, it works fine on the Arduino.. and that is C++.. hmm, let's port it to plain Linux i2c interface (well, ok, wiringPi i2c wrappers). And so I did.

Here you go:

Raspberry Pi controlling LCD display with i2c in C++

I will do a bit cleanup and then code will be up on github.

You can get LCDs and i2c backpacks from Amazon: