We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I don't have a Raspberry Pi Pico and I still wanted to be able to try/use this with a normal Raspberry Pi 3+. So I tried to make this code compatible.
Here's how you do it: Just create a file in your cloned folder named machine.py and paste this code into it:
machine.py
import RPi.GPIO as GPIO GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) class PWMchanged(GPIO.PWM): def __init__(self, chan, freq): super().__init__(chan, freq) self.start(freq) def duty(self,dutycycle): self.ChangeDutyCycle(dutycycle/65535) def freq(self, value): self.ChangeFrequency(value) def deinit(self): self.stop() pass def PWM(pin): GPIO.setup(pin, GPIO.OUT) # Just to make sure return PWMchanged(pin, 50) def Pin(pin): GPIO.setup(pin, GPIO.OUT) return pin
The text was updated successfully, but these errors were encountered:
Thank you, very well integrated! You can add this to the readme as a pull request if you'd like, or I can add it myself
Sorry, something went wrong.
471b01b
No branches or pull requests
This issue is only to provide a way to run this on a Raspberry Pi 3+. This may not be added into the source code!
I don't have a Raspberry Pi Pico and I still wanted to be able to try/use this with a normal Raspberry Pi 3+. So I tried to make this code compatible.
Here's how you do it:
Just create a file in your cloned folder named
machine.py
and paste this code into it:The text was updated successfully, but these errors were encountered: