Preferences , 3D Visualization , Lights

edited September 2016 in Questions & Answers
Hi I am geeking out my machine. 
I was trying to understand how to add lights to repetier. I found this section in the preferences.  how do you leverage this ?  Is it for physical lights ? 



This is what I have and it works outside of repetier (tested the physical setup)  
I have this

and these


they are connected to ports D0,D1 and D57  and run correctly using this simple code. I wanted to control them in repetier (like when its heating cooling etc) 

again any help is always appreciated. 

id setup() {

 pinMode(1, OUTPUT);
 pinMode(0, OUTPUT);
 pinMode(57, OUTPUT);
} void loop() {
  

 digitalWrite(1, HIGH);  
 digitalWrite(0, LOW);
 digitalWrite(57, LOW); 
 delay(2000);               
 digitalWrite(1, LOW);
 digitalWrite(0, HIGH);   
 digitalWrite(57, LOW);
 delay(2000);
 digitalWrite(1, LOW);
 digitalWrite(0, LOW);   
 digitalWrite(57, HIGH);
 delay(2000);  }



Comments

  • No it for light calculation inside 3d view.

    Use 
    M42 P_pinnumber_ S255 or S0

    to toggle selected pins. Make sure they are not listed in sensitive pins in pins.h bottom.
  • Thanks that helped a lot. 
    I was using a sensitive pin D0 and D1 . I moved the whole rig to D63,D40,D42 that way I can use a straight 4 pin connector. 

    Works like a charm. adding the M42 commands to scripts in slic3r and repetier.  I have red for heating\printing, green when completed and then white when the end script runs.  

    Is there a pause timer anywhere I can leverage :) ?
  • What do you want to do with pause?
    G4 would be a pause gcode but it stops your print, whcih is not very usefull during print.
  • edited September 2016

    None of this is actually useful during a print.  it is helpful if you are hearing impaired (or watching on a webcam).  Visually signaling that something has occurred.  (I'm doing it because I am a geek and wanted to see if I could)

    I should have been more specific on my question. a wait x milliseconds then resume. The G4 command is exactly what I was looking for.  My lighting scripts run before\after printing occurs so a pause is not an issue.   I am leveraging scripting in both sclic3r and Repetier host.   My plan is I could add flashing or sequenced lights in these scripts ( on, pause x miliseconds, off,  pause x miliseconds, on ...........)


    Thanks


Sign In or Register to comment.