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.
Works fine for me.
Thanks a lot
Can you add option for gpio readall (include MCP23017 I/O)
donwloaded release wiringPi-41fb1b9
Installation in progress.
Will check before the end of the week
Thanks a lot
wiringPi Build script
=====================
WiringPi Library
[UnInstall]
[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
[UnInstall]
[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
[Link]
[Install]
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
Looks fine to me…
-Gordon
# gpio -x mcp23017:120:0+20 readall
gpio: i2c address (0x0) out of range
aoutch ;(
0x20 note 0+20
-Gordon
Hello,
I have a big problem, I can’t use softServo.h in my c code.
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.
-Gordon
When I usally use this (where 27 is Pin and Adafruit source http://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code.git):
# ./Adafruit_DHT 22 27
Using pin #27
Data (40): 0x1 0x56 0x0 0xf6 0x4d
Temp = 24.6 *C, Hum = 34.2 %
Do you have an idea how can I use it with my MCP23017 ?
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.
-Gordon
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.
-Gordon
Thanks Gordon. 2.07 fixed it, since sysFds is now initialized.