Pioreactor / rpi_hardware_pwm

Access the hardware PWM of a Raspberry Pi
Other
65 stars 15 forks source link

Question: frecvency #7

Closed chinezbrun closed 1 year ago

chinezbrun commented 1 year ago

how to read this: pwm.change_frequency(25_000)? 25Hz or 25kHz? if answer is 25Hz what means _000?

CamDavidsonPilon commented 1 year ago

Hi @chinezbrun,

It means 25khz. In Python, 25_000 is the same as 25000. The _ is a new Python3 feature that makes big numbers easier to read.

chinezbrun commented 1 year ago

thanks. all clear now. i just want to double check before running the code :)