HomeGenie Forum
General Category => Troubleshooting and Support => Topic started by: dani on March 16, 2014, 10:39:40 AM
-
Hi,
I need some help. I'am using RasPI with the 8 GPIO out mode to control 8 relais with optocoppler.
I got this logging text following but the GPIO Pin signals didn't move.
2014-03-16T10:28:53.7163990+01:00 MIG.Gateways.WebServiceGateway 192.168.1.11 api/EmbeddedSystems.RaspiGPIO/4/Control.On//1394962133192 HTTP GET
2014-03-16T10:28:57.5943470+01:00 MIG.Gateways.WebServiceGateway 192.168.1.11 api/EmbeddedSystems.RaspiGPIO/4/Control.Off/undefined/1394962137072 HTTP GET
2014-03-16T10:29:02.9866770+01:00 MIG.Gateways.WebServiceGateway 192.168.1.11 api/EmbeddedSystems.RaspiGPIO/4/Control.On//1394962142464 HTTP GET
2014-03-16T10:29:09.1708760+01:00 MIG.Gateways.WebServiceGateway 192.168.1.11 api/EmbeddedSystems.RaspiGPIO/4/Control.Off/undefined/1394962148648 HTTP GET
2014-03-16T10:29:19.1299810+01:00 MIG.Gateways.WebServiceGateway 192.168.1.11 api/EmbeddedSystems.RaspiGPIO/4/Control.On//1394962158608 HTTP GET
2014-03-16T10:29:22.8262850+01:00 MIG.Gateways.WebServiceGateway 192.168.1.11 api/EmbeddedSystems.RaspiGPIO/4/Control.Off/undefined/1394962162304 HTTP GET
Any idea on what I forgot ?
Do I need to install a special lib on RasPI ?
Thank's for help.
Cheers.
Dani
-
HG GPIO interface uses /sys/class/gpio .
Try this:
https://sites.google.com/site/semilleroadt/raspberry-pi-tutorials/gpio
to see if it's correctly working.
g.
-
Thank's Gene,
This works correctly. Only has some ports didn't work.
The port 21, in RasPI V2 the number is 27.
The ports 17 and 18 are reserved by something. I think the LIRC.
pi@raspberrypi /sys/class/gpio $ echo 17 > export
-bash: echo: erreur d'ecriture : Peripherique ou ressource occupe
pi@raspberrypi /sys/class/gpio $
I find the informations in the screenshot joigned.
So we must replace 21 by 27 for RasPI V2.
We can add : 7, 8, 9, 10, 11 if we don't use SPI control.
And we can add : 28, 29, 30, 31 with RasPI V2.
And I use the output card with 8 relais link here. Only around 10 ? on Amazon.
http://www.amazon.fr/relais-module-canaux-Arduino-Electronique/dp/B00GSY3XGA
Only I need to reverse the control On Off, Send 1 to Off and 0 to On.
Cheers.
Dani
-
Just an other point.
When we send the gpio number in export file : /sys/class/gpio/export.
The generate folder has no upper case at the first letter :
pi@raspberrypi /sys/class/gpio $ ls
export gpio23 gpio25 gpio4 gpio8 unexport
gpio22 gpio24 gpio27 gpio7 gpiochip0
pi@raspberrypi /sys/class/gpio $
So it's for that than gpio doesn't work properly.
Cheers
Dani