Skip to content

changed path for exporting pins#6

Open
rex-300FeetOut wants to merge 1 commit into
romilly:masterfrom
rex-300FeetOut:fixpath
Open

changed path for exporting pins#6
rex-300FeetOut wants to merge 1 commit into
romilly:masterfrom
rex-300FeetOut:fixpath

Conversation

@rex-300FeetOut

Copy link
Copy Markdown

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

DaWoody commented Mar 3, 2015

Copy link
Copy Markdown

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

maxbanas commented Apr 9, 2015

Copy link
Copy Markdown

Thanks all, worked for me too.

@windmaomao

Copy link
Copy Markdown

this works, especially after following DaWoody's comments.

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

Copy link
Copy Markdown

Thanks DaWoody you DaRealMVP

@solaron99

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown

There's an answer to fix it.

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

@knocte

knocte commented Oct 19, 2015

Copy link
Copy Markdown

Why this hasn't been merged yet?

@knocte

knocte commented Oct 19, 2015

Copy link
Copy Markdown

Actually there's a better fix: #7

@lurch

lurch commented Oct 19, 2015

Copy link
Copy Markdown

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
Copy Markdown

Thanks for the fix.

@crowelch

Copy link
Copy Markdown

Worked great thanks!

@solaron99

Copy link
Copy Markdown

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
Copy Markdown

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

@solaron99

Copy link
Copy Markdown

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

On Jul 26, 2016, at 09:15, rmzamith notifications@github.com 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
Copy Markdown

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

lurch commented Sep 29, 2016

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown

thanks guy! is work for me.

@solaron99

Copy link
Copy Markdown

@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.