hamongnguyetthanh
Posts: 1
Joined: Mon Jan 14, 2019 4:05 pm

pigpio error: "no permission to update GPIO"

Mon Jan 14, 2019 4:13 pm

I work on script so I want control to backlight of LCD screen with PWM(software). It is worked earlier but it does not work now. I commented out bakclight divide and worked on the other modules on software. Now I want use but I took this error. I researched on net but I could not fix this. How can I fix this error? My pwm code divide this:

Code: Select all

improt RPi.GPIO as gpio
import pigpio

pi=pigpio.pi()
print (pi.connected)    #Test for pigs t


gpio.setmode(gpio.BCM)
gpio.setwarnings(False)
gpio.setup(33, gpio.IN)  #Pin of DW button 
gpio.setup(30, gpio.OUT) #Pin of backlight
gpio.setup(39, gpio.OUT) #Pin of lcd on/off function

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

Re: pigpio error: "no permission to update GPIO"

Mon Jan 14, 2019 7:05 pm

Post the *full* error message *and* the code that causes the error (the code you posted above will crash on the first line, because there's a typo)
Use code tags for both; see viewtopic.php?f=32&t=84477

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 11217
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: pigpio error: "no permission to update GPIO"

Mon Jan 14, 2019 11:16 pm

added code tags, but left the typo intact.

Andyroo
Posts: 795
Joined: Sat Jun 16, 2018 12:49 am

Re: pigpio error: "no permission to update GPIO"

Mon Jan 14, 2019 11:51 pm

Am I cracking (well yes but you know what I mean) but I thought the BCM numbering only goes up to 26

https://pinout.xyz

So, for the numbers used below, should it not be

Code: Select all

gpio.setmode(GPIO.BOARD)
Need Pi spray - these things are breeding in my house...

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

Re: pigpio error: "no permission to update GPIO"

Tue Jan 15, 2019 7:10 pm

Andyroo wrote:
Mon Jan 14, 2019 11:51 pm
Am I cracking (well yes but you know what I mean) but I thought the BCM numbering only goes up to 26

https://pinout.xyz

So, for the numbers used below, should it not be

Code: Select all

gpio.setmode(GPIO.BOARD)
There's a GPIO27: https://pinout.xyz/pinout/pin13_gpio27

gpio.BOARD would also fail as that's ground https://pinout.xyz/pinout/ground
Looks like a bit of a mess...

Return to “Python”