Trouble

WiringPi - Node Red lemuntu problems

2 748
Edited by peteroakes at Feb 20, 2016 00:34

I have node red running on Debian (Lemuntu) and am having trouble with getting Wiring PI to work correctly or any of the other modules that touch the GPIO pins

I have replaced the WiringPi sub folder in the node with the wiringLMK (renamed to wiringpi etc) and can get it to compile after patching and adding a few files

Is there a later version of wiringLMK that includes the missing parts from wiringPI to be compatable and upto date ?

If not does anyone else have a solution for node red to use the gpio from the designer.

I already know about using the "echo 50 > /sys/class/gpio/export" type of method using an exec block but I would prefer to either use the same as the raspberry pi nodes or the function block like the following

  1. // select wpi pin on header (for v2)
  2. var pin = 7;
  3. // initialise the wpi to use the global context
  4. var wpi = context.global.wpi;
  5. // use the default WiringPi pin number scheme...
  6. //wpi.setup();
  7. wpi.wiringPiSetupPhys ();
  8. // initialise the state of the pin if not already set
  9. // anything in context.  persists from one call to the function to the next
  10. context.state = context.state || wpi.LOW;
  11. // set the mode to output (just in case)
  12. wpi.pinMode(pin, OUTPUT);
  13. // toggle the stored state of the pin
  14. (context.state == wpi.LOW) ? context.state = wpi.HIGH : context.state = wpi.LOW;
  15. // output the state to the pin
  16. wpi.digitalWrite(pin, context.state);
  17. // we don't "need" to return anything here but may help for debug
  18. return msg;
Copy the Code
I am trying to review the board and wanted to show it with a nice industrial / home automation scenario but this is holding me from completing the work so any advice would be appreciated

regards

Peter Oakes of the BreadBoard.
www.youtube.com/c/thebreadboardca
Me too Peter -  I installed Lubuntu and while Lubuntu works just fine (Debian) I'm getting no-where with the Wiring Pi - if this is to compete alongside the likes of the WELL supported Raspberry Pi 2 - I think I'd like to see a lot more effort into compatibility. As it stands there is no way to drop this board into Node-Red and make effective use of the IO ports that I can see.  I did get the serial ports to work no problem but there's a lot more to the board than that. Lubuntu does not seem to support the Bluetooth and attempts to load a supposedly compatible driver got Bluetooth working but it would not connect to a standard set of Bluetooth headphones.   Also loading up the Media Centre offering - absolutely nothing about Infra-Red remote control in there and you can't drop down to operating sytem level to check it out.

Some way to go I think.

Note: The author has been banned or deleted.

You have to log in before you can reply Login | Sign Up

Points Rules