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

changed path for exporting pins #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rexington
Copy link

the devices/virtual path wasn't working, but this one does work.

the devices/virtual path wasn't working, but this one does work.
@DaWoody
Copy link

DaWoody commented Mar 3, 2015

Must just say good job, it works! I am running a pi b +, with recent firmware etc, Did some manual changes to the file that was changed according to this commit, namely the file gpio-admin.c which can be found within the folder structure quick2wire-gpio-admin/src/gpio-admin.c and replaced the path as described in files changed (look at the tab files changed to get a visual). Did a "sudo make uninstall" from within the quick2wire-gpio-admin folder, then "sudo make install" and added the user "sudo adduser $USER gpio" (where $USER is your user..). Logout and login, and then voila it works! :) Just wanted to overexplain some stuff here incase somebody was struggling. But anyways thanks for this fix, good job 👍

@maxbanas
Copy link

maxbanas commented Apr 9, 2015

Thanks all, worked for me too.

@windmaomao
Copy link

this works, especially after following DaWoody's comments.

@lurch lurch mentioned this pull request May 5, 2015
@xristocodos
Copy link

Thanks DaWoody you DaRealMVP

@solaron99
Copy link

Thanks all,

Successfully rectified my group ownership issue after upgrading. I'm currently running version 3.18.5, model B+. I receive the following in Terminal:

Listening on port 3600
State on received.

The LED connected to GPIO pin #36 FLASH quickly ONCE and turns OFF when pressing 'ON' button on the web server page. The led functioned perfectly prior to the update.

Any suggestions? Thank you!

@singinglarvae
Copy link

Hello,

I just followed this fix, but I face exactly the same issue as solaron99 on another GPIO (#4) : the LED flash (and I can hear the relay switch) but quickly and then turns OFF after 1sec...

@ccforward
Copy link

There's an answer to fix it.

https://github.com/nickfloyd/raspberry-beacons

@knocte
Copy link

knocte commented Oct 19, 2015

Why this hasn't been merged yet?

@knocte
Copy link

knocte commented Oct 19, 2015

Actually there's a better fix: #7

@lurch
Copy link

lurch commented Oct 19, 2015

This hasn't been merged yet because the entire quick2wire software stack has unfortunately been completely abandoned by the original authors.
The last code-commit to any of the https://github.com/quick2wire projects was back in June 2013 :-/

@mstaffeld
Copy link

Thanks for the fix.

@crowelch
Copy link

Worked great thanks!

@solaron99
Copy link

Gentlemen,

I followed your suggestions but fail to resolve my issue.
The LED connected to GPIO pin #36 FLASH ONCE and turns OFF when pressing 'ON' button on the web server page. The LED turned on and REMAINED ON perfectly prior to updating to 3.18.11.

gpio-admin.c :

int size = snprintf(path, PATH_MAX, "/sys/class/gpio/gpio%u/%s", pin, filename);

pi-gpio.js :

var gpioAdmin = "gpio-admin",
sysFsPathOld = "/sys/devices/virtual/gpio", // pre 3.18.x kernel
sysFsPathNew = "/sys/class/gpio", // post 3.18.x kernel
sysFsPath;

app.js :

// Apply command GPIO #36

if (queryData.state == 'on') {
  gpio.open(36, "output", function(err) {     
    gpio.write(36, 1, function() {  
        gpio.close(36);             
            console.log("GPIO Pin 36: " + queryData.state + " received.");                
    });
});
}

if (queryData.state == 'off') {
gpio.open(36, "output", function(err) {     
    gpio.write(36, 0, function() {  
        gpio.close(36);    
        console.log("GPIO Pin 36: " + queryData.state + " received.");                
    });
});
} 

Any suggestions? Thank you!

@rmzamith
Copy link

@solaron99 , try removing the gpio.close(36); lines

@solaron99
Copy link

great, thank you! Will keep you posted on the results -ron

On Jul 26, 2016, at 09:15, rmzamith [email protected] wrote:

@solaron99 , try removing the gpio.close(36); lines


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@rbosneag
Copy link

Finally got it working thanks to @DaWoody and @rexington !

It would be great to have a robust library with no requirements to abandoned packages, up to date with the latest Raspbian, with better support for RasPi 3 - just working.

I'm new to the Raspi world and really hoped there was better support for NodeJs. Other than these pi-gpio guys' great work there are no viable options to get up and running with building the next IoT awesome products.

@lurch
Copy link

lurch commented Sep 29, 2016

I dunno if it's what you're looking for, but https://gpiozero.readthedocs.io is very comprehensive and included in Raspbian by default.

@rbosneag
Copy link

Thanks for the tip, it looks very promising.
I was looking for a Javascript library but gpiozero could be a good source of inspiration for many projects and a good guide on GPIO.

@zengdongbao
Copy link

thanks guy! is work for me.

@solaron99
Copy link

@rmzamith Your solution worked! Thank you.

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

Successfully merging this pull request may close these issues.