https://github.com/fossasia/pslab-python/blob/development/pslab/cli.pyto be able to call it directly from the cli. I assume using it in connection with collect would be the proper way to actually have data to forward. Connecting to external sensors is not possible through the cli currently I believe, correct?
I had a think regarding front end sensor integration: fossasia/pslab-python#200
I have a thought of including Adafruit's drivers which uses CircuitPython-busio, since pslab-python has busio (I2C) now. Which I planned to discuss in meeting. Unfortunately i am unable to attend.
spectro = TCD1304() data = spectro.read_signal()
set_state, PWMGenerator uses the firmware function sqr4. This function outputs a PWM signal on every SQ-pin, including pins which should be constant high or constant low. It is therefore necessary to reset pins which should not have PWM signals on them after calling the firmware function.
For testing SPI transfer, I planned to connect MISO and MOSI
(SDO -> SDI). Simple but, has some cons: can't test write and read independently, and can't test SMP bit of SPI config (main problem).
Then second plan, use logic analyser for MOSI and PWM generator for MISO. By this we can test write and read separately and can test SMP bit of SPI config. But testing SMP bit need precision PWM wave generation.
For testing, we need a PWM wave with the same frequency as SPI and 50% phase shifted from SPI. So that if we read, we get 0 (when SMP=0; Input data is sampled at the middle of data output time) and 0xFF (when SMP=1; Input data is sampled at the end of data output time).
SCK: ___|```|___|```|___|`` PWM: `|___|```|___|```|___| SMP=0: ___|_______|_______|__ (Input Sample) SMP=1: _______|_______|______ (Input Sample)