8

By default the header Pin Nr. 7 us used by the 1-wire kernel module.

I would like to change it to a one of the 4 new GPIO Pins of an Rev 2 Pi.

HSK
  • 81
  • 1
  • 2

2 Answers2

9

To change the default GPIO pin used for 1-wire communication you can edit the /boot/config.txt file and add this line:

dtoverlay=w1-gpio,gpiopin=x

where x is the GPIO pin you want to use. Reboot to see the change.

Joakim
  • 191
  • 1
  • 4
2

Important remark

it must be exactly as indicated, without any space between parameters and values in the command

As written above in /boot/config.txt

 dtoverlay=w1-gpio,gpiopin=x
Evaldo
  • 21
  • 1