fnuggelo
Posts: 4
Joined: Wed Feb 25, 2015 5:02 pm

Using GPIO-pins both as input and output

Tue May 19, 2015 1:36 pm

Hi!

I encountered an issue with setting up two different hardware modules on Raspberry Pi 2 Model B.
The first one is an LCD-display called C-Berry tft display. I use this one to print the result of a python script the RPi is running.
The second one is an RTC-module called RasClock, which I use to always keep the time and date updated even while being offline.
I installed the bcm2835 library by following this guide:
http://www.airspayce.com/mikem/bcm2835/
and the display worked properly.

However, after installing the RasClock by following this guide:
http://www.modmypi.com/blog/installing- ... time-clock
the RasClock worked properly, but then somehow the display stopped working. It remains black even when I run the example file for the display and tried to reinstall bcm2835 library.

Why does this happen? One idea I have is that when I installed the RasClock, the GPIO-pins were set to input instead of output and perhaps that's the problem, or is it even possible to use more than one hardware module on the RPi?
Any response is welcome.

Thanks in advance!

User avatar
joan
Posts: 14960
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Using GPIO-pins both as input and output

Tue May 19, 2015 2:11 pm

Software and hardware modules will coexist quite happily as long as there is no conflict over resources. Generally gpios can not be shared between modules. If possible you need to change one module so that it uses a different gpio.

Return to “Beginners”