import tqdm #import tnrange import numpy as np import time ktp = cw.ktp.Basic() trace_array = [] textin_array = [] textout_array = [] key, text = ktp.next() target.set_key(key) scope.adc.samples = 50000 print(scope.adc.samples) N = 1000 for i in range(N): print("+") scope.arm() target.simpleserial_write('p', text) ret = scope.capture() if ret: print("Target timed out!") continue response = target.simpleserial_read('r', 16) print("text", text) print("response", response) trace_array.append(scope.get_last_trace()) textin_array.append(text) textout_array.append(response) key, text = ktp.next()