Page 1 of 1

Unable to control gpio4

Posted: Fri May 19, 2017 3:43 am
by sebastianpj
Hello ,
I am using Raspberry pi3 in my project, I connected a Buzzer on gpio4. when i tried to acivate the buzzer, this pin will go to output mode and set as high, buzzer work for few seconds and then it stops. When I check gpio readall , it showing the pin is in input mode and value is 0.
I tried the above steps in my another pi, it also showing same.
Kindly help me to fix this problem.

Re: Unable to control gpio4

Posted: Fri May 19, 2017 9:51 am
by pcmanbob
Hi.

For us to be able to help you we need more information.
please post the code you are using to drive your buzzer as a start ( please use code tags to post your code) , seeing as you say it works for a while I assume its connected correctly.

Re: Unable to control gpio4

Posted: Fri May 19, 2017 11:02 am
by DirkS
pcmanbob wrote:Hi.

For us to be able to help you we need more information.
please post the code you are using to drive your buzzer as a start ( please use code tags to post your code) , seeing as you say it works for a while I assume its connected correctly.
+1

Also check if 1-wire is activated in /boot/config.txt; check for a line with 'dtoverlay=w1-gpio' in that file.