Jump to content

Recommended Posts

Posted

Hello,

 

I have problem with "Orange Pi Zero Plus" and functionality of Relay module (electrical circuit= normally closed).

Relay module is attached on pin/port number "0".

When I set up pin number "0" from "OFF" to "OUT" state with command:

gpio export 0 out

state is changed from OFF to OUT and parameter in column "V"  is "0". It should mean that relay stays turned of.

+------+-----+----------+------+---+
| GPIO | wPi |   Name   | Mode | V |
+------+-----+----------+------+---+
|   12 |   0 |    SDA.0 |  OUT | 0 | 

Problem is, that relay immediately after execution of mentioned command enables(turns on) output electrical circuit. Relay module is behaving like it was turned on, however it is not supposed to be (since 0= turned off). 

 

I can change this inconvenient situation with command for turning on (1=turned on) and output is then turned off.  These commands work, but they work in reversed way and in result everything works reversed. 

   gpio write 0 1

 

gpio write 0 0 >>> should turn off output circuit, for me it turns circuit ON

gpio write 0 1 >>> should turn on output circuit, for me it turns circuit OFF

I hope this was clear, it is hard to describe what is happening. 

Can anyone please advise me on what is going wrong and how to fix my issue?

Thank you

 

Posted

Have you tried using sysfs directly? 

Have you recheck the port used? The formal is (Position of letter in alphabet - 1) * 32 + Pin number

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines