L
L
Lion Golden2018-06-01 16:38:44
Node.js
Lion Golden, 2018-06-01 16:38:44

Why are GPIOs not responding to commands (Orange PI Win Plus/WiringOP/NodeJS)?

Installed WiringOP.
I installed orange-pi-gpio for the node.
I connected the LED to 38-39 GPIO.
js code:

const Gpio = require('orange-pi-gpio');

let gpio = new Gpio({pin:38});
gpio.write(0)
.then((res)=>{
  console.log('succes: '+res);
})
.catch((err)=>{
  console.log('err: '+err);
});

Gives out succes but nothing happens... I found that WiringOP does not consider all ports as GPIO and it has 38 is 28, tried with 28 - the same result. I tried to turn off all the GPIOs with a cycle, they also do not respond.
I go back a level up to WiringOP itself.
gpio readall- reads successfully.
5b114ac3600ac044438151.png
gpio write 38 0
gpio write 28 0
- to no avail
Running from sudo does not help.
Where to dig further?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lion Golden, 2018-06-18
@nimayoleynik

I don’t know what exactly happened, but I reinstalled everything with a clean Armbian and everything worked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question