Home » 2015 » January

First Example release ready

My first developments are ready. In short I created a java application that has to be installed on the Raspberry Pi which will read temperature and pressure from an Adafruit sensor (mpl1115a2) and showing reading on a small 16×2 LCD screen (Adafruit). As said in my previous post, I only used java technology and Pi4J. But in fact this is not 100% correct because behind the scenes, Pi4J is using a library called Wiring Pi. The wiring was simple once you know how to connect the pins to the LCD screen.

  • First read about the installation steps for using and installing Pi4J
  • To connect the LCD to the RP the following site was very useful : http://wiringpi.com/dev-lib/lcd-library/
  • For the use of the barometric sensor (mpl115a2) I would like to refer to the site : Adafruit mpl115a2
  • Information on LCD shield kit w/ 16×2 Character Display
    • I did not use the shield.  I did not manage to get it working using Java and the Pi4J api.  I am sure it is possible but the complexity lays in the fact that the shield has an I2C expander and that made me give up in a first stage.  I did get it working compiling one of the C Examples from the Wiring Pi site but my goal was to get it working via Java.  I know, I am stubborn.

Components used

  • breadboard (big enough)
  • Raspberry Pi B+
  • ADS1115
  • mpl115a2
  • LCD shield kit w/ 16×2 Character Display
  • lots of wires

Tools used :

  • Intellij
  • Git
  • SourceTree

Important notice:

For the RP to be able to read from the sensor, an analog to digital (ADC) converter is necessary since the sensor only returns analog information.  I have chosen for the I2C protocol so I needed an ADC which supported this protocol.  For this project I used the ADS1115.  It took me a while to understand but that was more related to the fact that I have no electronics background.  But anyway, Google showed me the way to some interesting sites to get my knowledge in this context up to scale.

Lessons learned

  • before using the sensor and lcd, make sure you have done all the soldering necessary.  I made the mistake of not doing this in the beginning causing malfunction of the LCD but after soldering, all issues disappeared.
  • Read the datasheets carefully.
  • Doublecheck the wirings
  • make sure you have a big enough breadboard

The source code is available on Github: https://github.com/jbyle/PI4JDevelopment.git

Comments of any kind are well appreciated, also source improvements.


Continue reading »

First small project

Time to talk about my first project. The idea is to read the temperature and pressure from a Barometric Pressure/Temperature sensor and show the information on a small 2 row LCD screen. I already got all the hardware : Raspberry Pi, sensor, LCD screen, Analog to Digital converter. I already did some research on the internet to get me started. As Development Tool I will use IntelliJ. Technology of course will be java and my goal is to use Pi4J for the complete project. As SCM I will use Git. I will be using BitBucket as remote git repository. Once I have a stable version I will also put the source code on GitHub to share with the community.



Continue reading »

Hello blog

Hi there,

Welcome to my blog.  The goal is to put my experiences on this blog during my experiments with Java and Raspberry Pi.  I worked early in my career as C developer but got interested in Java pretty soon.  After a period of developing for different companies (CIMAD IBM, Real Software and Fortis Bank) my career evolved the natural flow meaning that you always start as a developer but along the way evolve to other positions and at the end having no close touch anymore with the technology and sitting behind the desk doing administrative stuff : wanted, unwanted or without thinking. I am not saying doing administrative tasks is bad but what I want to say that a good developer should stay a developer unless they are really bored being creative behind their PC. I followed the natural evolutions which goes on in software companies. It started with coaching young developers but rapidly moved towards architecture, project management, coordination, analysis, …, and at the end doing close to no development. At some point a couple of years ago the development team I was coordinating, was doing a brainstorm session for a big project we would be working on. They were talking about J2EE, Spring, Maven, Hibernate, Struts, Jaxb, Junit, Test coverage, Continious integration, deployment, … I heared of those things and mostly knew the basics behind but what happened in that meeting was the fact that I realized that I was loosing touch with the technology and I was sitting behind my desk explaining in words what a system should do instead of inventing the system myself and creating it as developer. There it is, the word creating. During that meeting I realized that I was missing being creative. Being able to create a piece of software which is used by people to help them in their day to day work. So rapidly I started buying books, lots of books to bridge the technical gap I was building up the last years. But that was not enough. More and more I felt that being fulltime architect/analyst was not what I wanted. I wanna do things, I want my fingers on the keyboard doing creative work, I want to do more than being just up to date by reading books and searching info on the internet. So last year I decided to take the step and go back into development. Since them I am developing middleware software based on Apache Camel running in a FUSE environment.
In November I went to a big Java Conference (DEVOXX) in Antwerp. Heaven for any Java developer wanting to know what goes around in the Java world. And there it happened. There were some sessions about Raspberry PI and related java technologies. There was a great presentation by Robert Savage on home automation developments based on Java technology, running on Raspberry Pi (RP). See www.savagehomeautomation.com and www.pi4j.com Yes, the Internet of Things. I had heared of this subject already a few times but this was the first time I was on it. I don’t know what happened but I got so interested in this technology that I immediately bought a Raspberry Pi to make my first circuit connected to a Raspberry Pi. My Hello World was letting the Raspberry Pi lighting on and off a small led. Yes basic but you have to start somewhere. In the meanwhile I have bought some sensors, small LCD screen to continue my experiments with the technology. The goal of my blog is to write about my experiences using PI4J and answer any questions if there are any on the developments I do.

I also have a goal which I want to reach. It would be great to develop a radio controlled car with inside a RP and in the inside all components and sensors controlled by the RP.

Have fun reading my blog

Jan Bylé

Continue reading »