Access Watchdog Timer of Raspberry Pi using JAVA

This tutorial is all about using the watchdog timer of Raspberry Pi by using JAVA. For this, we are going to use Pi4J library. Watchdog Timer: “A watchdog timer (sometimes called a computer operating properly or COP timer, or simply a watchdog) is an electronic timer that is used to detect and recover from computer malfunctions. During normal operation, the computer regularly resets the watchdog timer to prevent it from elapsing, or “timing out”. If due to a hardware fault or program error, the computer fails to reset the watchdog, the timer will elapse and generate a timeout signal.…

Read More

DHT12 Interfacing with Raspberry Pi using Pi4J


This video around raspberry pi showing how to interface DHT12 humidity and temperature sensor with raspberry pi by using JAVA nad Pi4j. DHT12 its a temperature sensor with a 1-Wire and I2C interface to connect with external controllers and having 1-Wire interface makes it compatible with the older DHT11 sensor but with a higher accuracy. For this tutorial, we are going to use the I2C interface of the sensor and to interact with it, we will be using JAVA. One issue with the DHT12 I2C interface is that the device…

Read More

Orange Pi Zero GPIO Programming using JAVA

Orange Pi Zero GPIO

This is a simple tutorial on Orange Pi Zero GPIO Programming using JAVA. For this, I have used Pi4J library which also works with Raspberry Pi. This tutorial might help you to interact with GPIO in your IOT projects. In his tutorial, I have tested the application with LUBUNTU OS on Orange Pi Zero.         Video: Code: import*; import com.pi4j.platform.Platform; import com.pi4j.platform.PlatformAlreadyAssignedException; import com.pi4j.platform.PlatformManager; public class Mainclass { public static void main(String[] args) throws InterruptedException, PlatformAlreadyAssignedException { System.out.println(“Starting Demo”); PlatformManager.setPlatform(Platform.ORANGEPI); // Support for Orange Pi final…

Read More

IIC (I2C) Communication on Raspberry Pi by using JAVA

MCP23017 with raspberry Pi using I2C Communication

This tutorial is all about IIC (I2C) communication on Raspberry Pi by using JAVA and for that, I have used Pi4J library. To demonstrate this in the tutorial I have used MCP23017 Port expander IC with Raspberry Pi. MCp23017 is a 16 Bit input/output Port Expander ICcomes with I2C Interface. To interact with the IC suing IIC (I2C) port  here we have used Pi4J and JAVA. MCP23017 Features: 16-bit input/output port expander with interrupt output Cascadable for up to 8 devices on one bus 25mA sink/source capability per I/O Supports 100kHz, 400kHz,…

Read More

Measure Distance using Ultrasonic Sensor HC – SR04 | Pi4J | JAVA | Raspberry Pi


This is a simple tutorial showing how to interface HC – SR04  ultrasonic ranging module with Raspberry Pi to measure distance using JAVA. Ultrasonic ranging module HC – SR04 provides 2cm – 400cm non-contact measurement function, the ranging accuracy can reach to 3mm. The modules include ultrasonic transmitters, receiver and control circuit. The basic principle of work: (1) Using IO trigger for at least 10us high-level signal, (2) The Module automatically sends eight 40 kHz and detect whether there is a pulse signal back. (3) IF the signal back, through…

Read More

Thermocouple Interfacing usng MAX31855 | Raspberry Pi

Thermocouple Interfacing usng MAX31855 | JAVA & Pi4J| Raspberry Pi

Reading thermocouple data on Raspberry Pi using JAVA and Pi4J with the help of MAX31855 14 bit thermocouple to digital converter. The MAX31855 performs cold-junction compensation and digitizes the signal from a K-, J-, N-, T-, S-, R-, or E-type thermocouple. The data is output in a signed 14-bit, SPI-compatible, read-only format. This converter resolves temperatures to 0.25°C, allows readings as high as +1800°C and as low as -270°C, and exhibits thermocouple accuracy of ±2°C for temperatures ranging from -200°C to +700°C for K-type thermocouples. Source : MAXIM Integrated(  …

Read More