When you want to build complex microcontroller projects in which data needs to be exchanged between different devices, you need a fast and reliable way to exchange data. In the last article, we investigated serial UART connection, a direct one-to-one interface. This article continues the series with the I2C protocol, a half-duplex, bidirectional communication system with many-to-many servers and clients. We will see how to wire a Raspberry Pi and an Arduino Uno to form an I2C connection and exchange data between the two systems.

This article originally appeared at my blog admantium.com.

Setup

In the following setup, the Raspberry Pi…


In complex projects, you will need to connect multiple microcontrollers with each other. This connection can be made with different protocols and libraries. This article explores available options and presents easy to follow code examples.

Specifically, you will learn how to connect an Arduino Uno to a Raspberry Pi using a USB connection.

This article originally appeared at my blog admantium.com.

Arduino

We start with a simple example. On starting, the Arduino will open a serial connection and blink an LED to show that it is alive.

#include <Arduino.h>#define LED 4void setup()
{
Serial.begin(9600);
pinMode(LED, OUTPUT);
}
void blink()…


Arduinos are great microcontroller for your embedded projects. During one of my projects, I wanted to have a simple command prompt to trigger commands at the Arduino, for example to print a message on a LCD display, or to move a servo motor with attached ultrasonic sensor. It is easy enough to listen to a single char and take this as a command, but if you come from Linux or Mac, you are used to have rich CLI tools.

In the following article, I explain how to build a simple terminal prompt for your Arduino. …


The Raspberry Pi is one of the most popular single board computers for hobbyists. Its 40 Pins support the protocols I2C, SPI, and UART. If you followed the series, you are familiar with those protocols. But how can you use them with your Raspberry Pi?

This article shows you how to work with these protocols using Python. For each protocol, I will list the libraries, and show you a simple example so you can start easily.

This article originally appeared at my blog.

I2C

You have several choices when working with I2C devices. The ubiquitous and universal library luma offers a…


The Raspberry Pi is single board computer with now four revisions and a minimalistic zero variant. It is a popular choice for different projects because of its small size, efficient power consumption, processing speed and by being a full Linux based computer.

When you want to connect several microcontrollers with each other, several protocols exist: I2C, SIP, and UART. In my last two articles, I explained these protocols and showed examples for C++ libraries with Arduino and with the Raspberry Pi.

This article now presents general GPIO libraries for working with the Raspberry Pi. The libraries are Wiring Pi, Pigpio…


The Raspberry Pi is a single board computer with now 4 revisions and a minimalistic zero variant. It is a popular choice for different projects because of its small size, efficient power consumption, processing speed and by being a full Linux based computer.

One way to connect multiple single-board computers and/or microcontrollers is direct wiring. For this purpose, the most common used protocols are I2C, SPI and UART. Preceding articles in the blog series explained the principles of these protocols, and presented specific C-libraries for the Arduino. In this article, I will explain C++ libraries that enable to work with…


The Arduino microcontroller is a versatile microcontroller, a true workhorse for many do it yourself projects. It has enough pins to connect several sensors and actuators. When building more complex system, you need to have a means for communicating with other microcontrollers or even single board computers.

In the last article, I explained the main protocols that are available on the Arduino and the Raspberry Pi: 1-Wire, I2C, SIP, UART. In this article, we will explore the libraries that are used to establish the connection with these protocols. …


Microcontrollers like the Arduino are an essential part of DIY projects including robotics. In the last article, we saw the Pin layout and GPIO functions of the Arduino Uno, the Raspberry Pi and the Raspberry Pico. GPIO pins can either read or write digital data, that is a continuous high or low voltage, or work with analog data, a PWM signal that alternates between high and low voltage in a compressed time frame. We also saw that these microcontrollers and single-board computers support different GPIO functions, including protocols to communicate data with other hardware.

This article provides an overview to…


The Raspberry Pi Pico, or shorthand Pico, is a new microcontroller from the Raspberry Pi foundation. From its hardware side, it provides a dual core ARM processor, 2MB of flash memory, and 26 GPIO pins. From its software side, it offers an extensive C/C++ SDK as well as a port of MicroPython.

This article details the Pico’s hardware, its digital and analog pins, and the pin functions it offers.

This article originally appeared at my blog.

Pico


The Raspberry Pi is a single board computer that numbers 4 revisions and a minimalistic zero variant. It is a popular choice for different projects because of its small size, efficient power consumption, processing speed and it being a full Linux based computer.

In this article, I will explain which connection capabilities the Raspberry Pi model 3 and 4 provide, and which functions they natively support (that is, functions that do not require additional HATS extension).

This article originally appeared at my blog.

Raspberry Pi Specs

Sebastian

IT Project Manager & Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store