Pycorpm_2.py __init__ 118 line
-
Hi,
I have fipy and trying to get device make some measurements at regular intervals and if accelerometer movement is detecte it shoud wake up.
going along tutorials in docs, but this error stoped me.
Pycoproc init Traceback (most recent call last): File "main.py", line 22, in <module> File "/flash/lib/pycoproc_2.py", line 118, in __init__ KeyboardInterrupt: Pycom MicroPython 1.20.2.r6 [v1.11-c5a0a97] on 2021-10-28; FiPy with ESP32 Pybytes Version: 1.7.1
code is here
import machine from machine import Pin import time import pycom from pycoproc_2 import Pycoproc from LIS2HH12 import LIS2HH12 from rgb import led_blink from acc import activity_int_handler from timing import cycles_counter, create_message, clean_msg pycom.heartbeat(False) sleep_time = 10 #sleep in seconds send_cycles = 4 send_cycles_key = "c1" send_location_cycles = 10 send_location_cyckes_key = "c2" print("Pycoproc init") py = Pycoproc() print("Accelerometer init") acc = LIS2HH12() #more code here but i think it is not nessesary. wake_pins = [Pin('P13', mode=Pin.IN, pull=Pin.PULL_DOWN)] machine.pin_sleep_wakeup(wake_pins, mode=machine.WAKEUP_ANY_HIGH, enable_pull=True) print("-----------------------------------") print("Going to deep sleep for", sleep_time, "s") py.setup_sleep(sleep_time) py.go_to_sleep(gps=True, pycom_module_off=True, accelerometer_off=False, wake_interrupt=True) machine.deepsleep(1000*sleep_time) print("This will never be printed")
not all code here but, after 2 cycles i get this error, as I understand this is something when board is starting I2C connection again.