Skip to content
Permalink
Browse files

added code to turn LED off and on using the RAMPS Pin

  • Loading branch information...
rkoeppl committed Jul 22, 2016
1 parent 88c7e2b commit af4ea72770dee4d74b2600634e0ef03b9eb13db9
Showing with 8 additions and 1 deletion.
  1. +8 −1 modules/printengine.pl
@@ -224,7 +224,7 @@
}

else { #if the configured Display software matches none of the supported packages, die
say "unknows display software $display_software , please review your configuration, get in touch with developers or fork the code on Github and contribute the code to use the new printer"
say "unknown display software $display_software , please review your configuration, get in touch with developers or fork the code on Github and contribute the code to use the new printer"
;
die "unknown display software in configuration!\n";
}
@@ -277,6 +277,7 @@
my @command_list=('G21','G28 Z');
send_commands(@command_list);
sleep 30;

my $z=0;
my $zdelta=$layer_height/1000;
#
@@ -285,6 +286,9 @@
my $fb = Graphics::Framebuffer->new( FB_DEVICE=>$display_device, SPLASH=>0 );
$fb->clear_screen('OFF');
foreach(@pics_sorted){
#turn on LED -LED is mapped to the Fan, Fan Pin in Firmware has been set to a PWM pin.
my @command_list=('M106 S255');
send_commands(@command_list);
$fb->blit_write(
$fb->load_image(
{
@@ -303,6 +307,8 @@
)
);
Time::HiRes::usleep("$exposure_time_us");
my @command_list=('M107');
send_commands(@command_list);
$fb->clear_screen('OFF');
$z=$z+$zdelta;
my $ztemp=$z+$overshoot;
@@ -312,6 +318,7 @@
Time::HiRes::usleep("$zsleep");
Time::HiRes::usleep("$resin_settling_time_us");
}

$fb->clear_screen('ON');
##sendcode- adapted and partially rewritten, inspiration taken from http://www.contraptor.org/about

0 comments on commit af4ea72

Please sign in to comment.
You can’t perform that action at this time.