package Curtains::Control; use strict; my $path = '/sys/class/gpio'; my $o_pin = 20; my $c_pin = 21; sub new { # open my $export, '>', "$path/export" or die("Unable to export the control pins"); # print $export "$o_pin\n"; # print $export "$c_pin\n"; # close $export; system("gpio export $o_pin high"); system("gpio export $c_pin high"); my $state = { STATE => 'UNKNOWN', }; return bless $state; }