I'm doing my first Raspberry Pi project, in which I want to get input from several sensors at the same time. I bought a DS18B20 temperature sensor, which is 1wire, and am able to get input with the code from Adafruit's tutorial. But when I wired another sensor, namely a regular photocell which uses GPIO protocol, the temperature sensor stops working. Here I am also using the Adafruit code. It just sends the same value (22 degrees Celsius) over and over again. I have been googling around but not finding any direct information about this. That is why I turn to you people.
Is Raspberry Pi only able to get input from one kind of sensor at a time from all pins? E.g. when the GPIO is turned on, the 1wire is turned off? And how can I go round it if this is the case?
The goal with the project is to use the sensor inputs to do an animation in Processing. I have already been able to set up a Server-client relationship between my temperature sensor code in Python and my code in Processing and that works if the photocell Python code isn't running.
Edit: I'm using BCM pin4 for the temperature sensor and pin18 for my photocell.