One could say don't use Thonny, use a Terminal Emulator or something else to connect directly to the REPL, but then one loses the convenient 'run what's in the editor' feature of Thonny. I don't know what the best solution to such issues is. In my experience that's usually because of threading, timer or interrupt callbacks. Thonny management errors are usually a sign the code on the Pico has got itself into a state which is at odds with how Thonny expects things to be. My recommendation is always to start simple, get a firm foundation and then build on that. Please assist on how to resolve this, I'm still a beginner and not sure on what to do. I tried to remove the loop but now I am getting a different error. ![]() > THONNY FAILED TO EXECUTE COMMAND get_globals Return for rec in cls.os.ilistdir(x) if rec not in ('.', getcwd(cls): Print('' % id(obj), repr(obj), '', print_mgmt_value(obj): Last_repl_values = print_repl_value(cls, obj):Ĭls.last_repl_values = cls.last_repl_values NameError: name 'pir_handler' isn't defined Standdown_pir3.irq(trigger=_RISING, handler=pir_handler)īluelock_pir6.irq(trigger=_RISING, handler=pir_handler)Ĭode: Select all Traceback (most recent call last): Sensor_dig2_pir5.irq(trigger=_RISING, handler=pir_handler) Sensor_dig1_pir4.irq(trigger=_RISING, handler=pir_handler) Sensor_adc2_pir2.irq(trigger=_RISING, handler=pir_handler) Sensor_adc1_pir.irq(trigger=_RISING, handler=pir_handler) _thread.start_new_thread(second_core_function or third_core_function, ()) Volt = POT.read_u16() * conversion_factor Test_led = machine.Pin(8, )Īctivate = machine.Pin(7, ) Sensor_dig2_pir5 = machine.Pin(15,, _DOWN)īluelock_pir6 = machine.Pin(6,, _DOWN) Sensor_dig1_pir4 = machine.Pin(14,, _DOWN) ![]() Sensor_adc2_pir2 = machine.Pin(28,, _DOWN) Sensor_adc1_pir = machine.Pin(27,, _DOWN) Code: Select all from machine import ADC, Pin
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |