kopia lustrzana https://github.com/jamesgao/kiln_controller
update defaults to be in the right direction
rodzic
141f699e9b
commit
e873ee7601
|
@ -40,7 +40,7 @@ const float step_interval = 1. / STEP_SPEED * 1000.; //milliseconds
|
|||
|
||||
//intermediate variables
|
||||
Adafruit_MAX31855 thermo(PIN_TEMP_CS);
|
||||
Stepper stepper(2048, PIN_STEP1, PIN_STEP3, PIN_STEP2, PIN_STEP4);
|
||||
Stepper stepper(2048, PIN_STEP4, PIN_STEP2, PIN_STEP3, PIN_STEP1);
|
||||
pushbutton reglimit = pushbutton(PIN_REGLIMIT, 5);
|
||||
|
||||
char i2c_command;
|
||||
|
@ -82,6 +82,7 @@ unsigned long now;
|
|||
void loop() {
|
||||
now = millis();
|
||||
reglimit.update();
|
||||
status.aux_temp[0] = reglimit.n_clicks;
|
||||
|
||||
if (stepper_target != status.motor && now > next_step) {
|
||||
dir = status.motor < stepper_target ? 1 : -1;
|
||||
|
|
|
@ -244,7 +244,7 @@ class Regulator(threading.Thread):
|
|||
pass
|
||||
|
||||
class Breakout(object):
|
||||
def __init__(self, addr, maxsteps=4500, minsteps=2500):
|
||||
def __init__(self, addr, maxsteps=6000, minsteps=3700):
|
||||
import breakout
|
||||
self.device = breakout.Breakout(addr)
|
||||
self.min = minsteps
|
||||
|
@ -255,7 +255,7 @@ class Breakout(object):
|
|||
self.off()
|
||||
atexit.register(exit)
|
||||
|
||||
def ignite(self, start=2800, delay=10):
|
||||
def ignite(self, start=3850, delay=10):
|
||||
logger.info("Igniting system")
|
||||
self.device.ignite = 255
|
||||
time.sleep(delay)
|
||||
|
@ -280,4 +280,5 @@ class Breakout(object):
|
|||
|
||||
def off(self):
|
||||
self.device.motor = 0
|
||||
self.device.ignite = 0
|
||||
logger.info("Shutting off regulator")
|
Ładowanie…
Reference in New Issue