WiringPi v2 (point 03) is released!

After some months of testing and time away due to family issues, a short holiday and what-not, wiringPi v2 has been pushed to the GIT repository and is now released!

Changes: 100’s. There is now a completely re-written internal structure that allows for analogRead() and analogWrite() functions (hardware permitting – e.g. on the Gertboard and other A/D converters). There is a mechanism for adding new GPIO hardware – e.g. MCP23x17 (both I2C & SPI variants) and much much more!

As usual, feedback is welcome – my plan is to run a forum here shortly, but for now I’ll allow comments on this post, or drop me email.


WiringPi v2 (point 03) is released! — 13 Comments

    • wiringPi Build script

      WiringPi Library
      [Compile] wiringPi.c
      [Compile] wiringSerial.c
      [Compile] wiringShift.c
      [Compile] piHiPri.c
      [Compile] piThread.c
      [Compile] wiringPiSPI.c
      [Compile] wiringPiI2C.c
      [Compile] softPwm.c
      [Compile] softTone.c
      [Compile] mcp23008.c
      [Compile] mcp23016.c
      [Compile] mcp23017.c
      [Compile] mcp23s08.c
      [Compile] mcp23s17.c
      [Compile] sr595.c
      [Compile] pcf8574.c
      [Compile] pcf8591.c
      [Compile] mcp3002.c
      [Compile] mcp4802.c
      [Compile] mcp3422.c
      mcp3422.c: In function ‘myAnalogRead’:
      mcp3422.c:46:37: warning: variable ‘b3’ set but not used [-Wunused-but-set-variable]
      [Compile] drc.c
      [Link (Dynamic)]
      [Install Headers]
      [Install Dynamic Lib]

      WiringPi Devices Library
      [Compile] ds1302.c
      [Compile] maxdetect.c
      [Compile] piNes.c
      [Compile] gertboard.c
      [Compile] piFace.c
      [Compile] lcd128x64.c
      [Compile] lcd.c
      [Link (Dynamic)]
      [Install Headers]
      [Install Dynamic Lib]

      GPIO Utility
      [Compile] gpio.c
      [Compile] extensions.c

      All Done.

      NOTE: This is wiringPi v2, and if you need to use the lcd, Piface,
      Gertboard, MaxDetext, etc. routines then you must change your
      compile scripts to add -lwiringPiDev

    • Well – in some ways I’m rather glad. It’s there as an example only. It suffers from excess jitter and will burn out servos. Do not use it. Have a look at the servoblaster kernel module instead – I’m told its much more reliable.


    • Using the DHTxxx sensors via the mcp23017 is not going to be possible as they have rather strict timing requirements, and I don’t think that I2C is fast enough to poll the pins needed.

      There is a maxdetect devLib driver for these devices though in the devLib directory – which will use the native Pi GPIO. Not written the docs for it yet, but look at the rht03.c program in the examples directory.


  1. WiringPi 2.0, multiple interrupts do not work.

    I have the LCD module with 4 buttons from http://www.mypishop.com (http://www.mypishop.com/Read%20Your%20Pi%20!.html).
    Modified the isr.c in the examples directory to use only the first 4 entries and to the GPIO pin numbers for the buttons on my module.
    Testing one button at a time with ‘gpio -wfi’ works fine.
    However when running the isr program only the last defined button produces output.
    Rotating the definitions (calls to wiringPiISR) makes only the last defined button produce output.
    Any idea what is going on? Suggestions for things to try?
    If interrupts do not work, I will have to poll the buttons in a separate thread.

    • Please fetch the latest update – there was a un-initialised array that crept in.