OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › 1-wire conflicts with OSPi’s use of GPIO 4
- This topic is empty.
-
AuthorPosts
-
July 25, 2013 at 3:16 pm #22554
marknorgrenMemberI have been using 1-wire temperature sensors with my rPi and recently have setup OSPi to run on my board.
Unfortunately OSPi’s use of GPIO pin 4 conflicts with the modules used for 1-wire sensors (w1-gpio, w1-therm)
I believe this is the code with the hard coded GPIO pin 4:
https://github.com/raspberrypi/linux/blob/rpi-3.6.y/arch/arm/mach-bcm2708/bcm2708.c#L80-L81Has anybody else ran into this issue? Does anyone have a recommendation on the best solution for this?
I am not sure on how to recompile this module, so any pointers would be greatly appreciated!
June 13, 2014 at 6:44 am #25114
Corvus13MemberI know this is old but a solution has been found.
Since Raspbian 2013-12-20
Edit the file /boot/cmdline.txt as root and add config parameter bcm2708.w1_gpio_pin=(for example bcm2708.w1_gpio_pin=25) Then reboot RPi and you are all set.
But remember pin number is real GPIO pin number not pin position on GPIO pin header.June 15, 2014 at 10:18 pm #25115
robgreenParticipantand the same is my problem …
I wanted to use GPIO interface 4 That is to Dallas DS18B20 1-wire temperature sensorI wanted to connect to the pins free of raspberry specifically …
PIN17 3.3V
PIN25-GND
and
GPIO4? which alternatives???OSPI 1.4 uses the first 8 pins on the 3.3V column … and the first 5-pin on the 5V column
see attached imagesomeone was able to use the digital sensor DS18B20 with OSPI ??
June 17, 2014 at 2:52 pm #25116
RayKeymasterCorvus13’s post says a solution has been found, by changing the 1-wire pin to another pin (other than GPIO 4 which is already used by OSPi).
June 17, 2014 at 3:04 pm #25117
robgreenParticipantok thanks
I’ll try the solutionthe dubious was
to be obliged to use the pins in the same column 3.3Vso I understand that I can use
pin 17 3.3v
pin 20 ground
pin 22 GPIO25 (with edit config parameter)June 17, 2014 at 3:24 pm #25118
RayKeymasterthe dubious was
to be obliged to use the pins in the same column 3.3VI don’t think I understand what you mean. To clarify, if you look at the picture you attached, OSPi occupies these pins:
(first 8 pins on the 3.3V column): 1, 3, 5, 7, 9 (Ground), 11, 13, 15 (these are pin numbers, not GPIO names)
(first 5 pins on the 5V column): 2, 4, 6, 8, 10
So these pins should not be used for connecting to your temperature sensor. You can use any other pin.June 17, 2014 at 3:35 pm #25119
robgreenParticipantok
I’m sorry if I reply yet…
but the first 8 are
(first 8 pins on the 3.3V column): 1, 3, 5, 7, 9 (Ground), 11, 13, 15. stopI hope 17 is free, otherwise, I do not have to give pin power 3V…
June 17, 2014 at 3:52 pm #25120
RayKeymasterYou are right, I accidentally typed an extra 17. I’ve corrected it. 17 (3.3V) is free. Actually it doesn’t matter because all 3.3V pins are internally connected so there is no issue with them being free or not.
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › 1-wire conflicts with OSPi’s use of GPIO 4