laser PWM
So I read the section in driver.h about using the laser pwm, nut it not making sense to me how to use it, i put my laser on pin d9 (heater pin) so what do i need to do to use the pwm and how do i adjust it?
thank you for the help it makes it much easier than having to guess so much
thank you for the help it makes it much easier than having to guess so much
Comments
void LaserDriver::changeIntensity(secondspeed_t newIntensity)
{
#if defined(DOOR_PIN) && DOOR_PIN > -1
if(Printer::isDoorOpen()) {
newIntensity = 0; // force laser off if door is open
}
#endif
if(EVENT_SET_LASER(newIntensity))
{
// Default implementation
#if LASER_PIN > -1
WRITE(LASER_PIN,(LASER_ON_HIGH ? newIntensity > 199 : newIntensity < 200));
#endif
}
intens=newIntensity;//for "Transfer" Status Page
}
You see our code only sets it on/off but it offers a solution by implementing EVENT_SET_LASER to set the intensity using a hardware pwm or send intensity vie I2C just like you need it. Forum has already some implementation if you search it.D9 Is for 12V full power. Sure this is the right pin to connect? Many lasers have a 5V TTL line to trigger on/off and use permanent 12V to e.g. also show a help light, power electronics...