GithubHelp home page GithubHelp logo

Comments (4)

tleyssens avatar tleyssens commented on June 15, 2024

Hi, i have the same problem, also after apt-get update/ upgrade.

Greatings.

from wiringpi-node.

TheNotary avatar TheNotary commented on June 15, 2024

Hopefully you sorted things out by now, but something doesn't look right about those pin numberings. The comment indicates pin 7 is of interest. The pin terminology you're using is the 'wiring pi' terminology, and pin 27 may refer to a BCM pin 27, which would be wpi pin 2. Maybe that's the issue?

I have an additional issue where I was trying to set the pull up resistor on a pin. When I would close the circuit to ground, nothing happened... however, when I touched the pin (while beeing bare footed and standing on a wood floor of course) the callback would then and only then fire. I tested this many times. I don't really know my ee so it seems weird to me. The fix was to use the gpio utility to set the pin to input and up.

gpio mode 0 in
gpio mode 0 up

In my case, I was using wpi.setup('sys'); so the app could be run as an unprivileged user. As such I refered to the wpi pin zero as 17. Is there a chance there's something funky in the code about that?

Would someone be willing to confirm this strangeness? The pin that should be touched is on header 11. Somethings up with the pull up/down transistor code if it only fires on your contact instead of when it's touched to ground (say header 6).

Test Setup (incomplete?):

$  gpio mode 0 in
$  gpio edge 0 rising
$  gpio exports
GPIO Pins exported:
   0: in   1  rising  
  17: in   0  rising

Test code:

  var wpi = require('wiring-pi');
  wpi.setup('sys');

  var pin = 0;
  var bcm_pin = 17; // pinTranslator.toBCM(pin); // 17

  wpi.pinMode(bcm_pin, wpi.INPUT);
  wpi.pullUpDnControl(bcm_pin, wpi.PUD_UP);

  // A.  Get initial state of pins and report states

  wpi.wiringPiISR(bcm_pin, wpi.INT_EDGE_RISING, function(delta) {
    console.log("detection made... you probably touched wpi pin " + pin);
  });

I'm trying it for a second time after rebooting... and it's just not responding to touch or being connected to ground unless I do gpio mode 0 up which I wouldn't expect I would need to do from bash since there's a function to do that, right?

from wiringpi-node.

TominJoseph18 avatar TominJoseph18 commented on June 15, 2024

Hi.

I want to send interrupts through my gpio pins. I am using the wiringPi Library for this purpose. When a code to wait for interrupt is run ,the ethernet connection to my laptop breaks and it says broken pipe error.

Could someone please help me to execute a command X in C when an interrupt event occurs which also prevents any kind of switch debouncing and transient voltages.

Thank you.

from wiringpi-node.

michaeljanich avatar michaeljanich commented on June 15, 2024

I had a similar problem and I changed the pin and grounded the shield in the (2m long) cable, that probably acted as an antenna.

Don't use pins like i2c or w1 (pin 7 in whatever counting). You never know if there's a kernel driver "working" on those pins.

-M

from wiringpi-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.