-- _PROGRAM 2.3 local robot = require("robot") local component = require("component") function checkSwitch() robot.setLightColor(0xF4FF0D) if robot.count(1) > 50 component.inventory_controller.equip() if robot.count(1) > 50 end function expUse() robot.setLightColor(0x00FF00) --green print("Extracting...") robot.use() while true do checkSwitch() end while true do expUse() end