Revision history for Perl extension RPi::WiringPi.
2.3633 2019-09-19
- emergency release to correct an oversight in a test file, preventing
failed installations
2.3632 2019-06-22
- added the digital potentiometer (MCP4xxxx) to the test platform (in
this case, we're using the single pot MCP41010). (Closes #87)
- correct markup error in FAQ (closes #100)
- added BMP180 to the test platform (closes #85)
- OLED displays are now available
- reorganized all test files so that when unit testing with
Test::BrewBuild, the LCD will retain the test results for the majority
of the test run
- added new testing env var "RPI_RELEASE_TESTING", so that we can
install other CPAN distributions without breaking things due to
"RELEASE_TESTING" always being set
- fully integrated the new RPi::SysInfo distribution as a parent to
RPi::Core
- updated stepper motor FAQ with new GPIO expander functionality
(closes #102)
2.3631 2019-02-25
- no functional changes -- all changes are documentation
- added section on the automated testing section of FAQ that on modern
perlbrews (>0.86), you must have more than one perl installed for the
version numbers to be displayed (closes #96)
- in FAQ's perlbrew setup, add the task of doing a reboot after install
(closes #93)
- removed most of SYNOPSIS and replaced with a link to the FAQ
(closes #92)
- added RPi::Pin's pwm_range() to the FAQ (closes #91);
- added section in auto-test section of FAQ for Test::BrewBuild install
(work on #95)
- added piece on how to ensure sudo $PATH is set correctly (closes #95)
- various minor FAQ/POD updates
2.3630 2019-01-04
- added new identify() method in Core (closes #82)
- added new binary "pidentify" that gets installed with the distribution
- update test files to exit if test file specific env vars aren't set
before checking for PI_BOARD
- added missing ICs and sensors to the test section in POD, and added
information on newly added test environment variables
- change a markdown format to POD format in FAQ (fixes #81)
- fix wire colour for the latch pin on the shift register in the test
platform diagrams (fixes #80)
- in t/15.pwm_spi_adc.t test file, we now set RPI_ADC=1 if we've
successfully reached the sudo load
- pinmap binary now uses "/usr/bin/env perl" as the shebang line instead
of "/usr/bin/perl"
- implemented a hard-wired and soldered (ie. more permanent) unit test
platform, replacing the breadboard. Tickets open to add further
sensors and ICs very soon
- removed "-T" (taint mode) in stock test files
- fix issue in Core.pm POD where we had broken links to internal
headings
- removed the "setup" test files. They were disabled ages ago, and since
we don't overtly advertise the various setup methods, we're no longer
testing them
- re-enabled the check_pin_status() test function in t/RPiTest.pm
(closes #88)
- removed the sudo requirement for t/75-serial.t tests
- t/75-serial.t puts()/gets() test updated due to non-printable char
(fixes #89)
2.3629 2018-10-03
- added io_led() and pwr_led() to modify the two LED status' for visual
identification of which Pi hardware board we're currently working on
(closes #75)
- added label() to provide the facility to add a name/label to your Pi
object
- fix GPIO Expander example in FAQ not rendering as code (closes #76)
- fix erroneous apostrophe in test section in FAQ (closes #79)
- update unit test pins in use in t/README file (closes #77)
- bumped prereq RPi::I2C to 2.3607, due to error message and other
cosmetic fixes corrected in that distribution
- bump prereq of RPi::GPIOExpander::MCP23017 to 1.00
- bump prereq of RPi::DHT11 hygrometer distribution to 1.04
- bump prereq of RPi::SPI to 2.3609
2.3628 2018-06-07
- added support for the MCP23017 GPIO expander chip via the
RPi::GPIOExpander::MCP23017 distribution (closes #73)
- bumped version of RPi::Const prereq to 1.04
2.3627 2018-05-29
- added "Usage" section for RTC in FAQ
- added t/64-i2c_exceptions.t to catch a particular panic, and test
fixed exceptions in that dist
- bumped prereq of RPi::I2C to 2.3606 that includes above fixes/changes
- cleanup and slight modifications/updates to POD
2.3626 2018-05-29
- fix POD head level for SETUP's Serial configuration
- provide more descriptive scenarios when to disable _fatal_exit()
(closes #68)
- remove statement in POD where we claimed that the BCM pin numbers were
printed on the physical board (fixes #67)
- correct typo in POD SYNOPSYS for dac() where we were sending in
incorrect parameters (fixes #66)
- correct some method's Parameter section to follow my normal standard.
(closes #69)
- added rtc() in support for the RPi::RTC::DS3231 distribution
(closes #70)
- added pwm_defaults constants to RPi::Const, and removed PWM magic
numbers from Core (closes #72)
- added DS3231 RTC connections in the unit test physical diagram
(closes #71)
2.3625 2018-04-19
- in FAQ, add the 4 row 20 col config to env vars (closes #65)
- bumped prereq RPi::Pin to 2.3606
- added I2C, Serial and SPI configuration details at the top of the FAQ
(closes #63; closes #64)
- re-enabled "both" interrupt test file (closes #48)
- servo() now accepts a configuration hash that allows sending in a
non-default PWM clock speed and PWM range (closes #45)
- modified GPS examples to use the new GPSD::Parse methods
2.3624 2018-03-27
- added blurb in FAQ Testing section that describes setting up I2C and
serial properly
- bumped prereq version of WiringPi::API to 2.3616 which provides more
elegant handling if the version of wiringPi that's installed isn't
at the minimum 2.36
2.3623 2018-03-14
- Pi day!
- added support for the new RPi::StepperMotor distribution
- reworked the FAQ and added Test::POD::LinkCheck tests to ensure all
POD links resolve correctly
- add blurb in FAQ that the pi user may need to be added to the "gpio"
group for sudo-less access
- bump prereq of GPSD::Parse from 1.01 to 1.02 due to the new
convenience methods added recently
2.3622 2018-02-10
- no functional changes
- added env var and related info about testing RPi::LCD in the testing
section POD (closes #59)
- fix small formatting issue (C<<>>) in POD (closes #56)
- test fixes/updates
- t/RPiTest.pm now checks whether the serial pins (14, 15) are in alt
mode 4 (default) or 2 (bluetooth disabled)
- add blurb in FAQ and POD about lowering I2C bus speed if using I2C
with an Arduino (closes #61)
- fix incorrect RPi::Pin POD link in Core (closes #60)
- add blurb about disabling bluetooth when using serial (closes #57)
- re-added t/README for test GPIO pin usage (closes #58)
- bump prereq versions of RPi::Serial, RPi::I2C, RPi::SPI
2.3621 2017-10-03
- removed the test/images and images/ directory from the repo
- renamed Util.pm to Core.pm
- we now use RPi::Const in replacement of RPi::WiringPi::Constant
(closes #52)
- updated diagrams with the ADS1115 ADC
- renamed the PWM test to show it also includes SPI
- re-enabled t/42 for interrupt both
- updated FAQ unit test section with a blurb about the HCSR04
ultra-sonic distance sensor (and how it requires an env var)
- removed assignment of pin objects where it wasn't really necessary, we
were just using them for registration purposes; we just make the calls
in void context
- fix issue in t/80-mode_state_all_pins.t where we were calling a setup
routine before checking if we're on a Pi board
- dac() POD now lists the mandatory parameters and some of the optional
ones (fixes #54)
- alphabeticalized the subs both in code and POD (closes #53)
- bumped prereq of RPi::ADC::ADS from 1.01 to 1.02
- fix a missing escape in FAQ POD (fixes #47)
2.3620 2017-07-13
- worked around issue where bbdispatch/brewbuild was causing havoc on
pin cleanup due to the LCD. After trial and headache, I just disabled
those pins from being checked (closes #41)
- added new FAQ test section for the list of env vars with descriptions
- fix issue where in dac(), we weren't registering the CS pin correctly
- alphabeticalized public methods within the code
- added full support for the HCSR04 ultrasonic distance measurement
sensor (closes #42)
- Util now exposes pwm_mode() and pwm_clock()
- added test/sg90_servo.pl as a baseline test for controllerless servo
control
- added servo(), sets up PWM and returns a RPi::Pin object tied to the
PWM GPIO pin, after all frequency modifications are made to the PI
(closes #43)
- added _pwm_in_use(), sets a flag that we need to reset PWM frequencies
on the board back to default at cleanup()
- modified t/15-pwm.t. We now use an ADS1115 ADC to test the PWM
functionality (closes #46)
- added t/41 and t/42; we now test falling, rising and both for
interrupts
- added t/90-servo.t to test the actual PWM cleanup() routine
- removed sudo requirements for the interrupt tests, as root isn't
needed for PUD or interrupts
- bumped ::Pin, ::API and ::Constant up to coincide with the new PWM
functionality
2.3619 2017-07-04
- hid all of the setup() tests. Somewhere in the last commits we broke
it, but that's actually ok
- all external devices/sensors that require GPIO pins have all of those
pins registered prior to returning the object
- registered pins are still stored in $ENV{RPI_PINS}, but we store them
within a JSON hash now, along with each pin's state and alt mode
- in cleanup, we now use WiringPi::API directly to reset all registered
pins back to the way they were as the program first started up
- significantly beefed up the testing regime. On each test file, we
check that all pins are back to their default (pre-test) state and
mode. Added t/RPiTest.pm to handle the work
- addded new DEVELOPMENT section to FAQ; added blurb about registering
pins if adding new subs
- all pins are now reset to default with cleanup(), as well as on any
crash (closes #34)
- fix typo in GPS section in SYNOPSIS (closes #37)
- clarify in POD that it's not just WiringPi::API we use (closes #38)
- clean up POD (closes #36)
2.3618 2017-07-01
- incorporated RPi::Serial
- bumped remaining prereqs specific to RPi:: that needed it to encompass
all known bug fixes and feature adds
2.3617 2017-06-28
- fix wire colour for the DAC CS pin in the diagram (light blue from
orange)
- added the tester flag to bbdispatch in the FAQs automated test section
- bump ver of RPi::LCD to 2.3603 due to a bug fix
- added new tests to t/60-lcd.t to verify that RPi::LCD dies() properly
if too many LCD objects are initialized (closes #35)
- bump prereq of RPi::DHT11 from v1.02 to v1.03
- bump prereq of RPi::I2C from v2.3602 to v2.3603
2.3616 2017-06-24
- fix FAQ link in the Test portion of POD
- clean up the way _fatal_exit() works. There's more to do here
- tidy how the RPI_PINS env var is worked on in certain Util:: methods
- incorporated RPi::I2C; updated POD and FAQ
- added t/65-i2c.t for the I2C stuff. Requires an Arduino. See
examples/arduino.ino for details
- added a copy of the arduino.ino sketch for testing RPi::I2C, in
docs/sketch
- fixed bug in arduino.ino that wasn't resetting the register variable
back to default, causing failure of a basic read if the I2C bus hadn't
been reset before another t/65-i2c.t test run (removed workaround from
the test as well)
- bump ver of RPi::WiringPi::Constant prereq after adding ALT mode tag
- bump ver of WiringPi::API to 2.36.12 due to updates in that module
- bump ver of RPi::Pin to 2.3602
- added t/70-mode_alt.t to test the various ALT pin modes
- fix shift register tests. The pins were outside of the $pi object
scope, so they weren't being reset to INPUT, which broke a later
test file
- added I2C/Arduino testing information to the FAQ, and updated the
diagrams with the Arduino wiring
2.3615 2017-06-22
- fixed issues with specific pins in test diagram for DAC (closes #29)
(closes #30)
- added more code to t/55-dac.t. We now thoroughly test both onboard
DACs. Updated diagram (closes #33)
- updated interrupt tests to conform to set_interrupt() as opposed to
the old interrupt_set()
- send in model => MCP4922 by default in dac() if it's not sent in, and
update docs accordingly (closes #31)
- moved the removal of the pin env var to outside of the for() loop in
Util::cleanup (closes #32)
- added Perlbrew install instructions into the SETUP section of FAQ
- removed erroneous LWP::Simple use statement in t/60-lcd.t that was
breaking tests
- sudo run t/40-interrupt_and_pwd.t were setting PI_BOARD recklessly,
breaking the tests within if we're not set up correctly. Same with
t/15-pwm.t
- minor code cleanup/tidying
2.3614 2017-05-27
- added GPSD::Parse support via gps()
- removed all traces of software PWM (closes #7)
- added a note in FAQ that explains that sudo is not required unless
using PWM features (closes #26)
- removed standalone Interrupt object code and documentation
(Interrupt.pm)
- removed RPi::WiringPi::Pin, and made it standalone. We now require
RPi::Pin external distribution instead (closes #25)
2.3613 2017-05-09
- added Test::BrewBuild auto testing instructions in the FAQ
- added t/60-lcd.t for LCD testing (requires setting env vars manually)
- updated the Test::BrewBuild integration unit testing docs in FAQ
- added PI_BOARD check to t/55-dac.t (closes #24)
2.3612 2017-04-11
- added check in cleanup() so we don't throw undef warnings if there
weren't any pins registered during the program run
- added DAC test file
- add parent.pm as a prereq to make things 5.8.9 compliant
- remove rogue "use feature 'say'" lines from tests for 5.8.9 compliance
- fixed git links in Makefile.PL. They were pointing to the old p5- repo
- deleted RPi::WiringPi::LCD, and turned it into a standalone dist,
RPi::LCD
- we now require RPi::LCD v2.3601
2.3611 2017-03-26
- added fritzing and breadboard layout for the ADC/DAC test
configuration for brewbuild CI
- clean up Pin::set_interrupt() code to call API code directly
- fix up tests that require sudo (we now recall the tests with sudo if
they are not called with it)
- in pud(), we no longer set the pin to INPUT automatically
- we now require WiringPi::API 2.3609 due to PUD/Interrupt fixes there
- added proper interrupt and pud tests
- in Util::cleanup(), removed the use of sudo for decommissioning pins
- added t/README file, which specifies the GPIO pins in use for the
unit test suite
- added unit test section to FAQ
- in Interrupt POD, specify that if the handler routine can't be found,
simply add the full package name to the callback
(eg: 'main::callback)
2.3610 2017-03-13
- added in support in adc() to allow usage of the MCP3008 ADC from
RPi::ADC::MCP3008 (closes #21)
- fix typos in some module names we're including
- added unregister_pin() again, we can now unregister pins manually
- began process of rewriting unit tests in preparation for full blown
automation
2.3609 2017-03-13
- work on testing inheritance of sub modules
- quote two-decimal prereq versions as they were not valid unquoted
- change version scheme from 2.36.x to 2.360x in modules and prereqs
2.36.8 2017-02-22
- we now require EUMM 6.72 to ensure multi-decimal version numbers of
prereqs don't break things
2.36.7 2017-02-02
- undocumented the ability to use the various wiringPi setup routines.
The functionality is still present, we're just not going to advertise
that it's there. The officially supported pin mapping scheme is GPIO
(closes #16)
- added in support for RPi::DAC::MCP4922 digital to analog converters,
and added dac()
- finally dumped RPi::WiringPi::BMP180 as a standalone distribution,
RPi::BMP180 (closes #15)
- updated copyright year from 2016 to 2017
- added in support for RPi::DHT11 hygrometers (closes #17)
- POD cleanup/fixes related to the work done in this release, as well as
unrelated fixes
2.36.6 2017-01-26
- * Notice * some functionality will be removed and/or hidden from the
next release, due to being incompatible or just plain me desiring to
rewrite them. Soft PWM is going as it doesn't work properly at this
level, and I'm seriously considering getting rid of all setup modes
less GPIO (as its a headache to maintain). I'll beef up the
translation tables though, so you can do such trickery as:
$ENV{RPI_PIN_MAP} = 'wpi'; or some such, and we'll translate the pin
numbers on the fly for you. Feedback welcome.
- updated FAQ, made section headers, fixed issue in shiftreg overview
- added breadboard diagram and fritzing project for dual 74HC595 shift
register connections, and other various schematics
- prereq version bumps: WiringPi::API v2.36.4, RPi::SPI v 2.36.4
- renamed error() to _error(), as it is literally an internal method
that traps $SIG collapses for cleanup, so that pod-coverage.t would
stop complaining
2.36.5 2017-01-22
- added dpot(), returns a RPI::DigiPot::MCP4XXXX digital potentiometer
object
2.36.4 2017-01-22
- fix params in POD, they weren't displaying correctly
2.36.3 2017-01-22
- pod fixes/updates
- added BMP180 section to FAQ
- added untracked files
- removed the ability to use SYS (GPIO_SYS) mode. It was implemented to
avoid having to be root
- moved gpio_layout() from core to Util
- RPi::ADC::ADS is now a prereq (v1.01)
- added adc() (closes #12)
- moved pwm_range() to Util, leaving only object creation methods
in the core module
- fixed POD in reference to shiftreg (closes #13)
- added ADC section in FAQ
- added docs/, with fritzing drawings and images for basic pwm/ADC
setup
- incorporated RPi::SPI as spi() to provide direct access to the Serial
Peripheral Interface
2.36.2 2017-01-14
- change versioning. The X.XX portion represents which version of
WiringPi::API and wiringPi we're compatible with
- cleaned up some tests due to previous changes
- added BMP180.pm module and all functionality of the barometric
pressure sensor per WiringPi::API
- updated ver of WiringPi::API prereq to v2.36.1
1.02 2017-01-13
- incorporated shift registers after adding to WiringPi::API
- added shift_register()
- updated documentation (POD and Tutorial)
1.01 2016-08-27
- no functional changes
- POD fixes, updates and clarifications (thanks 'jmlynesjr' from
PerlMonks for assisting)
1.00 2016-08-24
- SYS mode has been disabled and hidden until the PWM and interrupt
functionality can be sorted out for that mode
- cleaned up manual test help info as to be accurate
- POD editing
- test cleanup (all standard unit tests skip if not on a Pi)
- all manual tests pass (interrupts are a bit iffy still)
- bumped prereq of WiringPi::API to 1.04
0.99_06 2016-08-22
- POD cleanup
- cleanup() added, puts each registered pin in INPUT mode, and disables
PUD if set
- re-added register_pin(), we no longer keep track of objects, just the
GPIO scheme numbers for cleanup and error checking
- removed unregister_pin()
- we now die() if trying to use a pin that is already in use
- removed Interrupt::unset()
- removed Pin::unset_interrupt()
- software PWM is now implemented, but disabled due to issues yet to be
solved
- removed Board.pm from the distribution. The methods it used to handle
are now located directly in WiringPi.pm
- we now check for duplicate pins in $pi->pin() and in register_pin()
- added test for duplicate pin registration
- added system setup information in FAQ
0.99_05 2016-08-18
- added Util::_sys_mode() to determine if we need wrappers for certain
calls or not
- changed back to the default setup() call instead of setup_sys(), as
a lot of wrapping needs to be done (such as in pin_mode() and pwm())
to make things work properly
- fixed calls to _sys_mode() in new(). Didn't have the _ prefix
- we now check if something else has called a setup() routine
- new env var, RPI_SCHEME, set when a setup routine is called so that
if it's called twice, we'll know and be able to carry on
- added new RPI_MODE_* constants that contain pin modes. This replaces
_sys_mode() (removed) and cleans up other logic
- renamed gpio_map() and gpio_scheme() to pin_map() and pin_scheme()
respectively
- added CLI binary "pinmap", prints out pin mappings
- fixed return issue in pin_map()
- Pin: pwm() and pull() have been updated to work in setup_sys() mode
- Pin: pull() now automatically sets the pin into INPUT mode()
- we now default to SYS mode (ie. non-root) (documentation enhanced)
- when creating a new pin object in SYS mode, we now export() the pin
in new()
- rewrote register_pin() and unregister_pin(). They both translate the
pin number to GPIO no matter the scheme, then unexport() it
- added manual tests for all four modes in test/*
- slight edits in FAQ/Tutorial
- bumped req RPi::WiringPi::Constant to 0.02
- bumped req WiringPi::API to 1.03
0.99_04 2016-08-16
- added Tutorial/FAQ
0.99_02 2016-08-16
- bumped sub module versions so they'd show up on the CPAN
- began adding more elaborate tests
0.99_01 2016-08-16
- feature freeze. All work until 1.00 will be spent writing tests for
everything and ensuring documentation is accurate
- added Interrupt.pm, added associated methods in both WiringPi
and Pin
- Core::setup_sys() now exports all pins automatically with sudo. This
setup method is now the default if none is specified in new(),
meaning that by default, we now use the BCM pin numbering scheme
- renamed RPi::WiringPi::Core to WiringPi::API
- cleaned up code in Interrupt to deal with the much improved way we
now handle interrupts
- added pin_to_gpio() to Util, returns the BCM representation of a pin
number no matter what scheme is in use
- added interrupt_set() and interrupt_unset() to Pin
0.05 2016-08-13
- renamed WiringPi::pin_map() to gpio_scheme()
- added WiringPi::gpio_map()
- new()'s setup param now accepts 'none', allowing us to pypass the
wiringPi's initialization
- new Util.pm, moved all utility methods from WiringPi to Util.
WiringPi now only handles SIGs and component objects
- moved all param checking from Core into the respective modules here
to keep Core as close to the C code as possible
0.04 2016-08-11
- added LCD.pm module, for interfacing with LCD displays, along with
a massive update to Core
- changed LED::init() to just pass along the args hash, and let Core
deal with any issues
0.03 2016-08-11
- wrote RPi::WiringPi::Constant as a standalone module
- added $SIG{__DIE__} handler so we can clean up properly on die()
- added 'fatal_exit' new() param for testing
- we now catch $SIG{INT} as well, with a test
- new method pin_map(), returns the current pin mapping
- tests now work on non-Pi boards (if wiringPi lib is installed)
- implemented
- added Board.pm with methods rev(), wpi_to_gpio(), phys_to_gpio() and
pwm_range()
0.02 2016-08-10
- implemented getAlt() in Core, and in Pin, mode() with no params
now returns the current mode of the pin
- added cleanup()
0.01 2016-08-10
- initial prototype release
- added Pin.pm
- added error checking
- first round of tests
- NO_BOARD env var