Hm - strange. I meade only two changes in code. First: PWM output to: pwm = PWM(Pin(4))
and second: print(frequency)conection of pins 4 and 15 gives output belowconection of frequency generator to pin 15 gives output below:Also, after starting the code for the first time everything is ok, starting it second time gives an error:After that, I have to reconect the PICO over USB, to be able to run the code again...
and second: print(frequency)
Code:
def readout(a): global frequency frequency = ((out[1] << 8) | out[0]) / gate_time print(frequency)
Code:
>>> %Run -c $EDITOR_CONTENT>>> 999.01000.0999.01000.0999.01000.0
Code:
>>> %Run -c $EDITOR_CONTENT>>> 0.00.00.00.00.00.00.0
Code:
>>> %Run -c $EDITOR_CONTENTTraceback (most recent call last): File "<stdin>", line 2, in <module> File "PWMCounter.py", line 9SyntaxError: invalid syntax
Statistics: Posted by California — Thu Feb 29, 2024 10:11 pm