Skip to content

Race condition when launching commands right after init (in the py console) #26

@FilipDominec

Description

@FilipDominec

From the IPython console:

In [15]: import rp2daq 
    ...: rp = rp2daq.Rp2daq() 
    ...: ADC_raw_data = rp.adc(channel_mask=0x10).data 
    ...: ADC_averaged = sum(ADC_raw_data) / len(ADC_raw_data) 
    ...: print(f'Chip temperature is roughly {437-.46814*ADC_averaged:.1f} °C')                                                                               
Exception in thread Thread-308:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/home/dominecf/p/rp2daq/rp2daq.py", line 203, in _report_processor
    report_namedtuple_classes[return_values])
NameError: name 'report_namedtuple_classes' is not defined
2025-03-22 12:00:43,287 (MainThread) A Raspberry Pi Pico device is present but its firmware doesn't identify as rp2daq: b''
2025-03-22 12:00:43,288 (MainThread) Error: could not find any matching rp2daq device

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions