Skip to content

RPi Getting Started

jaenrig-ifx edited this page Nov 5, 2020 · 5 revisions

Overview

In this quick tutorial we will go through one of the C++ hall-switch examples available for the TLE4964-3M and the Raspberry Pi.

Required experience

  • Experience level: moderate
  • Basic linux user level
  • Basic programming skills (C/C++)
  • Basic soldering skills (recommended)

Required Hardware

Name Picture
TLE4964-3M Shield 2Go
Shield2Go Adapter for Raspberry Pi
Raspberry Pi 1 B+ or newer
8GB+ microSD card for Raspberry Pi
Magnet (included with the Shield 2Go)
Pin headers (included with the boards)
Micro-USB to USB A cable

Required Software

Tutorial

Hardware Setup

The TLE4964-3M Shield 2Go can be connected to the Raspberry Pi using the Shield2Go Adapter for Raspberry Pi.

Stack the Shield2Go Adapter onto the Raspberry Pi.
Stack the Shield2Go onto the adapter.
The hardware system is ready for evaluation.

Note ⚠️ : If the pin headers provided are not press-fit you will need to solder them on the corresponding boards. Otherwise, use your preferred way of connecting the hardware.

Raspberry Pi setup

Set up Raspberry Pi with Raspberry Pi OS or similar OS. Check this page for instructions.

You can access your Raspberry Pi either using a monitor and a keyboard or using SSH in a headless setup as described here.

Now insert the microSD card into your Raspberry Pi and connect a 5V power supply to boot it up.

Software Installation

Install required packages.
sudo apt-get install git wiringpi build-essential
Clone this library from GitHub.
git clone https://github.com/Infineon/hall-switch.git

Ready To Go!

With everything ready, now we are going to run one of the library examples.

Change into the Raspberry Pi framework folder.
cd hall-switch/src/framework/raspberrypi
Compile the example code.
make examples/hall-polling
Run the example code.
../../../build/hall-polling

Finally, we can check the terminal output. Just move a magnet near the sensor and check the output field value changing from 1 to 0.

Clone this wiki locally