sebastianpj
Posts: 1
Joined: Fri May 19, 2017 3:35 am

Unable to control gpio4

Fri May 19, 2017 3:43 am

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.

pcmanbob
Posts: 9612
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Unable to control gpio4

Fri May 19, 2017 9:51 am

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.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

DirkS
Posts: 10371
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Unable to control gpio4

Fri May 19, 2017 11:02 am

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.

Return to “Beginners”