Category Archives: featured1

Using u-Center to connect to the GPS on Raspberry Pi

u-Center from u-Blox is a graphical interface which can be used to monitor and configure all aspects of the GPS module on a BerryGPS-IMU or BerryGPS-GSM.

u-Center from uBlox


u-Center only runs on Windows. It can connect over the network to a Raspberry Pi.  This will require us to redirect the serial interface on the Raspberry Pi to a network port using ser2net.

Pi Setup

Do an upt-get update and then install ser2net;

pi@raspberrypi ~ $ sudo apt-get update
pi@raspberrypi ~ $ sudo apt-get install ser2net

Edit the ser2net config file and add the serial port redirect to a network port. We will use network port 6000

pi@raspberrypi ~ $ sudo nano /etc/ser2net.conf

And add this line at the bottom;

6000:raw:600:/dev/serial0:9600 NONE 1STOPBIT 8DATABITS XONXOFF LOCAL -RTSCTS

This is a breakdown of the syntax for the line above;
TCP port : connection type : timeout : serial port : serial port speed : serial options

you can now start ser2net using;

pi@raspberrypi ~ $ sudo ser2net

And you can use the below command to check if it is running by seeing if the port is open and assigned to the ser2net process;

pi@raspberrypi ~ $sudo netstat -ltnp | grep 6000

If it is running, you should see something similar to the output below;

check result of ser2net

Windows PC Setup and Connecting to the GPS module

You can download u-Center from here.

Once installed, open u-Center. You will get the default view as shown below.  No data will be shown as we are not connected to a GPS.

u-Center default view

The next step, is to create a new network connection and connect to the GPS which is connected to our Raspberry Pi. You can create a new connection under the Receiver and then Network connection menus.

u-Center connect to Raspberry Pi
In the new window, enter the IP address of the Raspberry Pi and specify port 6000. This is the port we configured in ser2net on the Raspberry Pi.
u-Center Raspberry Pi Address

This is what the default view looks like when connected and the GPS has a fix.u-Center connected



Below I will list of the more useful windows/tools within u-Center.
You can also click on the images below for a larger version.

Data View
This window will show you the longitude, latitude, altitude and fix mode. It will also show the HDOP, which is the Horizontal Dilution of Precision.  Lower is better, anything below 1.0 means you have a good signal.

u-Center Data View
u-Center Data View

Ground Track
This window will show you where the satellites are as well as what time.

u-Center Ground Track
u-Center Ground Track

Skye View
Sky view is an excellent tool for analyzing the performance of antennas as well as the conditions of the satellite observation environment.

u-Center Sky View
u-Center Sky View

Deviation Map
This map shows the average of all previously measured positions.

u-Center Deviation Map
u-Center Deviation Map

Continue reading Using u-Center to connect to the GPS on Raspberry Pi

Guide to interfacing a Gyro and Accelerometer with a Raspberry Pi

This guide covers how to use an Inertial Measurement Unit (IMU) with a Raspberry Pi . This is an updated guide and improves on the old one found here.

I will explain how to get readings from the IMU and convert these raw readings into usable angles. I will also show how to read some of the information in the datasheets for these devices.

This guide focuses on the BerryIMU. However, the theory and principals below can be applied to any digital IMU, just some minor modifications need to be made.

Git repository here
The code can be pulled down to your Raspberry Pi with;

pi@raspberrypi ~ $ git clone


The code for this guide can be found under the gyro_accelerometer_tutorial01_angles directory.

A note about Gyros and Accelerometers

When using the IMU to calculate angles, readings from both the gyro and accelerometer are needed which are then combined. This is because using either on their own will result in inaccurate readings. And a special note about yaw.

Gyros - A gyro measures the rate of rotation, which has to be tracked over time to calculate the current angle. This tracking causes the gyro to drift. However, gyros are good at measuring quick sharp movements.

Accelerometers - Accelerometers are used to sense both static (e.g. gravity) and dynamic (e.g. sudden starts/stops) acceleration. They don’t need to be tracked like a gyro and can measure the current angle at any given time. Accelerometers however are very noisy and are only useful for tracking angles over a long period of time.

Accelerometers cannot measure yaw.   To explain it simply, yaw is when the accelerometer is on a flat level surface and it is rotated clockwise or anticlockwise.  As the Z-Axis readings will not change, we cannot measure yaw.   A gyro and a magnetometer can help you measure yaw. This will be covered in a future guide.

Here is an excellent tutorial about accelerometers and gyros.

Setting up the IMU and I2C

The IMU used for this guide  is a BerryIMUv3  which uses a LSM6DSL,
that consists of a 3-axis gyroscope plus a 3-axis accelerometer and a LIS3MDL which is a 3-axis magnetometer.

  • LSM6DSL - Accelerometer and gyroscope datasheet can be found here.
  • LIS3MDL - Magnetometer datasheet can be found here


This IMU communicates via the I2C interface.

The image below shows how to connect the BerryIMU to a Raspberry Pi

BerryIMUv3 and Raspberry Pi I2C hook up


The BerryIMUv3 can also be connected using the Raspberry Pi QWIIC connector and cable;

QWIIC connector Raspberry Pi
QWIIC connector for the Raspberry Pi


Continue reading Guide to interfacing a Gyro and Accelerometer with a Raspberry Pi

PiScreen - 3.5" TFT(480x320) with touch control for the Raspberry Pi - Kickstarter launched

We have launched a Kickstarter campaign for a 3.5" TFT (480x320) with touch control, we have given it the name of PiScreen.

PiScreen includes a 3.5" TFT with touchscreen control, PCB and components needed to add this display to a Raspberry Pi.

PiScreen connects right on top of the Raspberry Pi GPIO pins

PiScreen can now be purchased directory from

PiScreen is compatible with all models of Raspberry Pi, including Pi 2.


The TFT used is the best quality we have seen so far.


Some specifics;
Touch Screen Resistive
Display construction 480 * 320 DOTS
LCD Controller ILI9481
Touch Screen ControllerXPT2046
Display Color Multicolor, 65536 colors

Head on over and check it out.

PiBBOT V2 - Balancing Robot using a Raspberry Pi

I have spend the last month creating a new version of PiBBOT (Pi Balancing roBOT) , PiBBOT V2.

This version has a sturdier frame and a LCD display. I replaced the 1.8" TFT with a LCD as the TFT was causing delays in the main loop timing. I also added a very slim battery for the Raspberry Pi.

Main components;

    • RGB backlight LCD 20x4 which shows gyro, accelerometer and complimentary filter angle.
    • Volt Meter to view condition of battery used for motors.
    • RF Receiver RF M4 Receiver - 315MHz. Used to tune PID and then control direction.
    • 1x4 Keypad to turn motors on/off and to reset the gyro.
    • Motors; 9.7:1 Metal Gearmotor 25Dx48L mm with 48 CPR Encoder
    • Wheels; Pololu Wheel 90x10mm
    • IMU; BerryIMU – An accelerometer, gyroscope, magnetometer and barometric/altitude sensor
    • Battery for Motors - 7.2V Tenergy 3800mAh Flat NiMH High Power (38A Drain Rate)
    • Battery for Rasperry Pi - Anker Astro Slim2 4500mAh Ultra-Slim Portable External Battery Charger Power Bank

    Continue reading PiBBOT V2 - Balancing Robot using a Raspberry Pi