3301991 / raspberrypi-gpio

Automatically exported from code.google.com/p/raspberrypi-gpio
0 stars 0 forks source link

Added pin Inversion as my hardware was inverted #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The issue:
My hardware was inverted so the on was the off and the off was the on

My solution
I've updated the database to add another column in pinDirection table called 
pinType with values of inverted or normal.  I then query this in the GPIO 
server.sh

I've attached the files here

I've tested this for GPIO 17 only so may have bugs in this 

Original issue reported on code.google.com by andrewis...@googlemail.com on 19 Aug 2012 at 9:06

Attachments:

GoogleCodeExporter commented 9 years ago
Hi there.
Did you connect to the GPIO pin and the GROUND pin, or the 3V3 pin, as this may 
have caused the issue.
As far as I'm aware, the hardware on the RPI hasn't changed as far as GPIO goes.
Many thanks, Daniel.

Original comment by drcur...@gmail.com on 14 Oct 2012 at 8:46

GoogleCodeExporter commented 9 years ago
Hi, it was the hardware connected to the rpi which means when the gpio is on 
the relay is off, therefore rather than have a higher level logic to say if I 
want the relay on then switch off the gpio I allowed the config of the meaning 
of the on and off in the gpio driver.
The concept is the hardware will be fixed and depending on the electronics 
connected to the pi on and off will be different.

I get the argument for not doing this and the app should know what the logic 
is, but that just leads to confusion, i prefer to get the hardware and software 
in sync, a on mean the relay or whatever is connected to the gpio is on not 
that the signal from the gpio is on

Therefore there is no problem i just added more features to the software

Hope this makes sense?

Original comment by andrewis...@googlemail.com on 14 Oct 2012 at 9:16