Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use more than 11 pigpio.gpio() #34

Open
plastik1337 opened this issue Feb 13, 2022 · 5 comments
Open

Can't use more than 11 pigpio.gpio() #34

plastik1337 opened this issue Feb 13, 2022 · 5 comments

Comments

@plastik1337
Copy link

This happens when i use 11, everything works normally
before

As soon as i add 1 more, this happens
after

I've tryed implementing it in different ways, i just could not make it work.

@guymcswain
Copy link
Owner

Which gpio numbers are you adding? Please show the api calls.

@plastik1337
Copy link
Author

function returnArray(){
const arregloAuxiliar = new Array(
new Entrada(17,'pollo1',null,false),
new Entrada(27,'pollo2',null,false),
new Entrada(22,'pollo3',null,false),
new Entrada(10,'pollo4',null,false),
new Entrada(9,'pollo5',null,false),
new Entrada(11,'gallina',null,false),
new Entrada(23,'novillo',null,false),
new Entrada(24,'chancho1',null,false),
new Entrada(25,'chancho2',null,false),
new Entrada(8,'maiz',null,false),
new Entrada(7,'expeller',null,false),
//new Entrada(1,'poroto',null,false) Here its the problem, i've tried other GPIO inputs
)

arregloAuxiliar.forEach(entrada =>{
	entrada.boton = pigpio.gpio(entrada.nroGPIO)
	})

return arregloAuxiliar

}

@plastik1337
Copy link
Author

plastik1337 commented Feb 13, 2022

class Entrada{
	constructor(nroGPIO, nombreEntrada, boton, fuePresionado){
		this.nroGPIO = nroGPIO
		this.nombreEntrada = nombreEntrada
		this.boton = boton
		this.fuePresionado = fuePresionado
	}
}

@guymcswain
Copy link
Owner

According to the userGpioMask = 268435452 = 0xFFFFFFC, the gpio 1 and 0 are not allowed. Try a different gpio.

@plastik1337
Copy link
Author

Looks like that was it, if it was not i'll update. Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants