matthewd92 Handy

Username matthewd92
Joined
Visits 1,992
Last Active
Roles Founding Pro, Tactile Sensor Beta Testers
Points 1,899
Invited bySamuel_Bouchard
Full Name Matthew Bush
Job Title COO/Cofounder
Industry Automation
Country US - United States
Company (optional) Hirebotics, LLC
Posts
1,022
Badges
21

Activity

  • Barrios
    Hi, thank you for your time, I am kind of new on UR do you know where can i find instructions on how to change LOCAL, TRUE, SET, WHILE, SLEEP and how to type the tread? thank you 
    you did answered to me:
    You can set the output to be low when not running, that will set it off anytime the program stops. 

    You would then need a thread monitoring the actual desired state of the button and setting the actual state to the desired state. So in your main program instead of setting the output on or off you would set the state to True or False, something like this.  Just set the thread to loop forever, that way when you restart the program the glue will turn back on if its needed to be

    local turnGlueOn = True # Would cause the glue to turn on
    turnGlueOn = False #Would cause the glue to turn off
    
    
    thread 1():
      set_standard_digital_out(PORT, turnGlueOn)
      while(get_standard_digital_out(PORT) == turnGlueOn):
        sleep(0.1)
      end 
    end 
    ·
    March 11