Code: Select all
def runstepper():
enaPin.low()
pulPin.low()
time.sleep_ms(1)
pulPin.high()
time.sleep_ms(1)
while True:
runstepper()
Code: Select all
def calcWeight():
val = hx711.get_value()
print(val*5/scale)
time.sleep_ms(1)
def runstepper():
enaPin.low()
pulPin.low()
time.sleep_ms(1)
pulPin.high()
time.sleep_ms(1)
while True:
runstepper()
calcWeight()
Code: Select all
while True:
appears. Is there a way that I can pass this error even I use while True ?core 1 in use error
Code: Select all
def main():
while True:
response = http.GET("example.com")
_thread.start_new_thread(measureweight_thread, ())
utime.sleep(0.01)
runstepper()
time.sleep(1)
relaylow()
time.sleep(2)
relayhigh()
utime.sleep(0.01)
main()