Tagged "Electronics"

Review of the Elecrow Raspberry Pi Pico Advanced Kit

People who follow me, know I’m a big fan of the Elecrow CrowPi, the little suitcase with a Raspberry Pi and a lot of electronic components included. I used it already a lot in my presentations at various conferences to demonstrate #JavaOnRaspberryPi. Recently, Elecrow sent me a “Raspberry Pi Pico Advanced Kit” for free, to test and evaluate it.

Controlling LED strips with Java

One of the most “fancy” electronic components is definitely a LED strip. It’s really cool to control a long strip of lights with only a few lines of code… But, there is a problem. The timing of the signals is crucial to reliably control these strips. Both Python and Java on a Raspberry Pi can struggle with these timings as they are running on Linux, a non-real-time operating system.

Reading the temperature, humidity, and pressure from a BME280 Sensor with Java, Pi4J, I2C, SPI, and JBang

To make it as easy as possible to get started with Java on the Raspberry Pi to interact with electronic components, I started a new section on the Pi4J website with JBang examples. In this tutorial, I want to show you how you can read the temperature, humidity, and pressure from a BME280 Sensor.

Using the Raspberry Pi Autofocus Camera Module 3 as HDMI camera

More than two years ago, I blogged about the use of the Raspberry Pi as an HDMI camera for the ATEM Mini. Although I have been using such a camera since then as my main Zoom camera, I wasn’t always happy with the image quality. The main problem was that the previous Raspberry Pi cameras had a fixed focus and it was quite hard to find the perfect focus.

HiveMQ Cloud, part 4 - Sending sensor data from Raspberry Pi Pico W to HiveMQ Cloud

Exactly one year ago, in December 2021, I published three articles of MQTT messaging with Raspberry Pi, Raspberry Pi Pico and HiveMQ Cloud. On June 30th of 2022, Raspberry Pi released a new product, that is the subject of this post: the Pico W. Yes, a new version of the original Pico, but with Wi-Fi.

Blink a LED and read a button state with Vaadin, Spring and Pi4J on a Raspberry Pi

As I’m becoming a senior developer in terms of age, I’ve transitioned from one language to another. One of my main interests has always been clean, easy-to-understand UIs (User Interface). That journey started for me with Director (to create multimedia CD-ROMs), Flash website animation, and Flex Rich Internet Applications (= “Flash on steroids”).

Using a Raspberry Pi as HDMI camera

TL;DR; Yes, you can build your own Raspberry Pi HQ camera to use as an HDMI source for the ATEM Mini Looking for an affordable camera with HDMI output? Build one yourself with a Raspberry Pi Zero 2! IMPORTANT: A new post is available with the new Camera Module V3 with auto-focus, released in January 2023.

HiveMQ Cloud, part 3 - Sending sensor data from Raspberry Pi Pico to HiveMQ Cloud

In the previous two posts in this series, we used Java on the Raspberry Pi mini-computer to send sensor data to HiveMQ Cloud, and visualize it on a dashboard. “Part 1: MQTT on Raspberry Pi, Send Sensor Data to HiveMQ Cloud with Java and Pi4J” “Part 2: Using MQTT and Raspberry Pi to Visualize Sensor Data on a TilesFX Dashboard” Now we are going to add some more data to our messaging system with another member of the Raspberry Pi family: the Pico.

Using Pi4j (V1) on the Raspberry Pi 4

A topic which comes up from time to time in questions related to Java and the Raspberry Pi, is the support of the 4th version of this board in combination with Pi4J, “the friendly object-oriented I/O API and implementation library for Java programmers to access the full I/O capabilities of the Raspberry Pi “.

Drumbooth controller with Raspberry Pi, JavaFX, and Arduino

Based on multiple examples from my book “Getting started with Java on Raspberry Pi”, I created a touchscreen controller for the drum booth of my son. Combined with relays boards and an Arduino this allows to control LED strips and different lights with a touch screen interface. There is also a web server included so we can trigger some events from anywhere in the house through a webpage so we don’t need to yell anymore from down the stairs when food is on the table ;-)

Controlling a LED number display with JavaFX and Python on Raspberry Pi

In my book I explain the use of bits and bytes by using a shift register SN74HC595 IC and 5101AS LED number display. A number display with LED segments Defining the bytes for each number In the table below the bits are defined to get the hex/number value needed to light up the required segments (A - H) of the LED segment display:

Calculating resistor value with a JavaFX application

Using the Java library I created (see previous post), it was a piece of cake to create a JavaFX UI on top of it! Source The sources are part of the GitHub project which contains all the other examples, scripts, readmes and a lot more which are used in the book to explain Java, JavaFX, Maven, Raspberry Pi GPIO’s…

Resistor color codes and calculations as a Java Maven library

Next step in my book progress, is getting more into the details of hardware components. And as always starting with the smallest most-used ones: resistors! To be able to fully document this for the book and create a demo application, I started again with creating and sharing a Java library.

Raspberry Pi history, versions, pins and headers as a Java Maven library

The best way to understand and learn something new, is to document it yourself. That’s what I’m doing in every step for my book-in-progress. And to fully get the pinnings and headers of the different Pi-boards, I decided to gather all info into a Java library with different enums to be able to auto-generate some content for the book and use in a few different example applications.

Controlling Arduino with Mosquitto and JavaFX on Raspberry Pi

One of the example applications in my book “Getting started with Java on the Raspberry Pi” combines a JavaFX application with Mosquitto on the Raspberry Pi to control a LED strip with an Arduino. All wireless and independent of each other as the Mosquitto-queue is dealing with exchange commands between all applications.

LED number display JavaFX library published on Maven

My very first open source JavaFX library is now available in the Maven repository! A small step for mankind, one giant leap for myself ;-) While working on Java example projects for my book “Getting started with Java on Raspberry Pi”, I needed a way to visualize a LED number display as used in electronics projects.

DIY Arduino MIDI instrument

And another summer project got finished… ;-) My sons drum corps teacher triggered me to build an Arduino Midi controller so he could practice his rhythm skills. Inspiration The easiest library is the Arduino Midi USB library as described here. Although I was not very happy with the code provided…

Clean Raspberry Pi GPIO testing with the Breadboard Pi Bridge

Some time ago I ordered a “Breadboard Pi Bridge - Pi Ports to Breadboard in Numerical Order” and reworked my Pi test setup from the previous blogs. And it looks really good! Before with the T-board and a cable it was already easy to find and connect each GPIO but the flat cable made it a bit ugly and oversized:

Pi4J to easily work with the hardware of a Raspberry Pi with Java

What is Pi4J See https://www.pi4j.com/1.2/index.html This project is intended to provide a friendly object-oriented I/O API and implementation libraries for Java Programmers to access the full I/O capabilities of the Raspberry Pi platform. This project abstracts the low-level native integration and interrupt monitoring to enable Java programmers to focus on implementing their application business logic.

Pi4J - Adding a REST interface with Spring Boot

As I was learning Spring Boot myself, I thought the easiest way to learn was trying to build an example and write about it. So here we go… :-) What is Pi4J? While doing my experiments earlier with Java 11 on a Raspberry Pi, I came accross the Pi4J project which allows you to control the GPIO pins easily from Java.

Pi4J - Extending with a JavaFX info application

While trying out what Pi4J can do, I found it could easily be extended with a JavaFX application to provide info about the headers on a Pi board. This could later be extended to a remote/local (touch) User Interface using the REST interface from this post. Starting point I started with the minimal JavaFX application I created before for a quick start with the correct pom.

Pong on a Raspberry PI

As a self-study project I experimented to create a Pong game + slide shown on a Raspberry PI with Tkinter, GPIO and physical buttons. Material list Raspberry PI, of course ;-) SD card with Raspberry Pi OS 3 boxes with on/off button like this one Breadboard for the first experimental setup Breakout connector like this one Or to help identify the GPIO pins you can also use RasPiO® Portsplus board Electrical cable with three wires Some breadboard cables Box to protect the Raspberry PI If you want easy control a bluetooth keyboard and/or Wifi dongle Assembling Connect the electric cables to the push buttons.