#!/usr/bin/perl

use Device::BCM2835;
use strict;

Device::BCM2835::init() 
 || die "Could not init library";


my $DRAWER_PIN = &Device::BCM2835::RPI_GPIO_P1_11;

# Blink pin 11:
# Set RPi pin 11 to be an output
Device::BCM2835::gpio_fsel($DRAWER_PIN, 
                            &Device::BCM2835::BCM2835_GPIO_FSEL_OUTP);

#while (1)
#{
    # Turn it on
    Device::BCM2835::gpio_write($DRAWER_PIN, 1);
    Device::BCM2835::delay(500); # Milliseconds
    #sleep 0.1;
    # Turn it off
    Device::BCM2835::gpio_write($DRAWER_PIN, 0);
    Device::BCM2835::delay(500); # Milliseconds
#}
