Konan has asked for the wisdom of the Perl Monks concerning the following question:
Ok. Enough lurking. Time to sign up. Perl amateur here, although using it since the turn of the century when I switched to Linux.
So... I use the GPIO's of Raspberry PI's for... well, lot of things, always using Perl for the code. Works great with the Cpan Device::BCM2835 module.
However, there is no call in the export list that allows for a variable to be used for input except for the $inputcmd. The actual call is...Device::BCM2835::gpio_fsel(&Device::BCM2835::RPI_V2_GPIO_P1_07, $inputcmd);
Thus far I have been hardcoding the call for every pin I need, which is ridiculous, but my efforts to make that 07 into a variable apparently are not letting me see the forest for the trees. ChatGPT comes close, but every example (lots of them) dies on the "strict subs" error or just flat doesn't work.
This should be easy, but again, I am hung up on it. Anybody able to show me what I am overlooking?
Thanks.
|
|---|