Wiring and Sensor guides for Raspberry PI with Xojo

For all that have not been on the beta list to have access to this then we have a section with Wiring and sensor guides for Raspberry PI with Xojo at:


All the guides are free of charge.

Guides so far:
HC-SR501 motion detection sensor
Relay board
F85 vibration sensor
Flame sensor
DHT11 and DHT22 humidity & temperature sensors
IR Infrared Obstacle Reflection Photoelectric Sensor
HC-SR04 and US-015 – Ultrasonic sensors
Connecting button with GPIO and using interrupts
Working with LED’s – And Wiring 4 pin RGB led to Raspberry PI

And more coming soon

Added a new guide:

Connecting MAX7219_LED_MATRIX with SPI bus

A free Einhugur Plugin comes with this guide that acts as a device driver to connect to the MAX7219_LED_MATRIX.

The plugin is capable to operate up to 8 daisy chained such matrixes on the same SPI bus. (Though not tested for more than one at this time since I had malfunctioning matrix component) - Will update the guide for daisy chaining on the bus once I got more matrixes to test.

Great! I’ll be keeping an eye on this!

Added one more guide:

Putting the GPIO pin behind transistor to get more current (and also dealing with undetermined state of the GPIO pin at startup)

As before it can be found at: https://einhugur.com/blog/index.php/xojo-gpio/

Some updates:

Doing a actual test showed that the old DHT11 temperature guide did not also cover the DHT22 sensor as I had thought at the time of writing the DHT11 guide.

So I updated the guide to actually work with the DHT22 sensor (which I highly recommend over the DHT11). The updated guide now comes with Xojo modules that act as device drivers, one for DHT11 and one for DHT22.

Also updated the HC-SR501 infrared motion detection sensor guide to now use Interrupts.

Added a new guide called

Using logic gates.

Also updated the Infrared sensor guide to add ST-00082 Mini as good substitute to the HC-SR501 (Thanks to Albin for testing this for me)
And updated the Connecting MAX7219_LED_MATRIX with SPI bus guide with a big power usage warning.

As before it can be found at: https://einhugur.com/blog/index.php/xojo-gpio/

Added a new guide called


This one is more deep down electric guide and less of coding. But none the less important knowledge for many projects.

Aslo updated the ultra sonic sensor guide with new data on how to get nothing detected signal from the HC-SR04 and how to gain more accuracy by taking into account how temperature affects speed of sound.

As before it can be found at: https://einhugur.com/blog/index.php/xojo-gpio/

Added guide for even smaller infrared sensor than before, one called “Mini IR Pyroelectric Infrared PIR Motion Human Sensor Detector Module” (Its a cheap Chinese one with no name that I know of).

Its under the motion detection guide. This one is special from the other 2 as its not safe to connect it directly to the GPIO without doing some circuit to protect it.

Aslo added some Generic chapters for Basic Electronics.

Coming up soon: The big automated fan controller project for Orange PI running as dedicated server.
(a huge guide is being written on this project but, it has no Xojo code but instead C++ demon that we will provide the code too as well, but it certainly can help Xojo users in many ways, entrance to Orange PI GPIO. (I think in Theory such daemon can be done in Xojo too) )

I just added a new guide.

The new one is called: PCF8591 Analog To Digital

This guide is a very important one since it opens up the world of Analog sensors and devices, including biometric sensors.

As always then our guides can be found here:

(The fan controller guide for Orange PI is still coming soon its just a big project with more people involved so wrapping it up takes time)

Excellent work :slight_smile:

I am having a little bit of 2nd thoughts, its probably not good idea to put 5V on this new one, so if someone is rushing to do it then do it on 3.3 V. (I will re-do the experiment and update the guide later on the weekend).

I will do some test with this guide tomorrow i will post the results here if you want!!

I updated the guide again, adding R6 and R7 to the circuit which are 15 k? resistors to bring the voltage on the I2C bus to safe levels.

So the guide should be good now.

I added a new guide:

HD44780 BASED LCD DISPLAY, connecting, coding and doing custom Glyphs

Now before going further then I want it to be known that this guide is much based on the Guide from Xojo Inc on HD44780 displays. I had been struggling a bit with my self if this guide should be made given that Xojo already had one but then I opted to do it for completeness and as base for other displays that we will be doing. As I went on though then I did some substantial improvements to the Xojo guide which should make this guide worth having. Those include custom glyphs, better detail on connecting and how to not damage your display if your display is not one that protects it self as the ones from Adafruit and other minor things.

As before the Einhugur guides can be found at: https://einhugur.com/blog/index.php/xojo-gpio/

I added yet another guide.

This time it is BMP180 Barometer sensor (on GY68 brake-out board).

This sensor uses the I2C bus.

Included with the guide there is a Xojo module that acts as device driver for the sensor as it is complicated reading from this one.

As before the Einhugur guides can be found at: https://einhugur.com/blog/index.php/xojo-gpio/

As promised then I have posted


This is not Xojo project, but you can do it all in Xojo too, and it will help users also build the circuits to use those small computers as home servers such as Owncloud servers for example.

Included in the article is:

  1. Circuit design.
  2. Cpp deamon to control it with guide how to compile and install.
  3. 3D models

Note this is not at same location as our other guide, you can find this one at:


The guide should work for all Orange PI models though the 3D models are made for the PC type. Its likely that the guide works 100% for Raspberry PI as well if not then at most the call to get CPU temp might need change.

If you have comments on it then please try to post it on the article since this article was joined effort and the other guy will not see the comments here.

I added a new GPIO guide called:

Building I2C logic converter.

This guide compliments the BMP180 barometer guide and the PCF8591 guide, makes the use of the I2C bus more correct and opens up the possibility of more complex use of the bus.

As before the Einhugur guides can be found at: https://einhugur.com/blog/index.php/xojo-gpio/

It was time for a new guide !! so now there is a new guide called:

PCF8591 Analog To Digital - Braking out of the box

[i]Building your own Analog to Digital board to over come limits of the bought brake-out board. This way you can connect up to 8 boards getting 32 channels in and 8 channels out.

Uses: I2C bus, and Lots of soldering ![/i]

As always before the Einhugur guides can be found at: https://einhugur.com/blog/index.php/xojo-gpio/

I updated the guide again, and the update actually raises good discussion.

What I did was I added a jumper (marked JP2) to disable the pull up resistors if there is already a device on the SDA bus that has pull up resistors. This is actually common problem, most bought brake-out SDA boards have pull up resistors, and only way to take them out is often to cut them so that you do not have two devices on the bus with pull up resistors.

(Sadly I was only able to update the schema my already soldered board cannot adapt to this update)