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
Hi!
I'm doing PWM but I cannot see any PWM signal when I try to connect.
I'm set the duty cycle the PWM with pwm0.setDutyCycle(do0/ControlView.MAX_SLIDER_VALE);
pwm0.setDutyCycle(do0/ControlView.MAX_SLIDER_VALE);
https://github.com/DanielMartensson/OpenSourceLogger/blob/master/src/main/java/se/danielmartensson/threads/ControlThread.java
And the PWM decleration looks like this:
// This will turn on/off the FQP30N06L MOSFET private Pwm createDigitalPWMOutput(int pinOutput, Context pi4j, String id) { try { // use try-with-resources to auto-close I2C when complete PwmConfig config = Pwm.newConfigBuilder(pi4j) .id(id) .name("PWM Pin output") .address(pinOutput) .pwmType(PwmType.SOFTWARE) .frequency(pwmFrequency) // optionally pre-configure the desired frequency to 1KHz .dutyCycle(0) // optionally pre-configure the desired duty-cycle (50%) .shutdown(0) // optionally pre-configure a shutdown duty-cycle value (on terminate) .initial(0) // optionally pre-configure an initial duty-cycle value (on startup) .build(); Pwm pwm = pi4j.providers().get(PiGpioPwmProvider.class).create(config); pwm.on(); return pwm; } catch (Exception e) { e.printStackTrace(); } return null; }
https://github.com/DanielMartensson/OpenSourceLogger/blob/master/src/main/java/se/danielmartensson/pi4j/IO.java
The pwmFrequency is 100
pwmFrequency
100
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi!
I'm doing PWM but I cannot see any PWM signal when I try to connect.
I'm set the duty cycle the PWM with
pwm0.setDutyCycle(do0/ControlView.MAX_SLIDER_VALE);
https://github.com/DanielMartensson/OpenSourceLogger/blob/master/src/main/java/se/danielmartensson/threads/ControlThread.java
And the PWM decleration looks like this:
https://github.com/DanielMartensson/OpenSourceLogger/blob/master/src/main/java/se/danielmartensson/pi4j/IO.java
The
pwmFrequency
is100
The text was updated successfully, but these errors were encountered: