UPB-FILS-MA / questions

A repository for hosting questions from students regarding lectures and labs.
1 stars 1 forks source link

Rust error #23

Open alecsandraiordache opened 6 months ago

alecsandraiordache commented 6 months ago

Question

I have an error regaring to the servo motor that i cannot fix. I tried to use also the labs.

Material read

Link of my project repository : https://github.com/UPB-FILS-MA/project-alecsandraiordache

alexandruradovici commented 6 months ago

Please describe what you did and what the error seems to be.

alecsandraiordache commented 6 months ago

Please describe what you did and what the error seems to be. I am doing an automatic plant watering where use a servo motor that opens the bottle cap and I have these errors: error[E0599]: no method named set_duty found for struct Pwm in the current scope --> src\main.rs:56:17 | 56 | pwm.set_duty(duty_cyclevalue); // Set the duty cycle value | ^^^^^^^^ method not found in `Pwm<'>`

error[E0599]: no method named set_duty found for struct Pwm in the curren

error[E0599]: no method named set_duty found for struct Pwm in the current scope --> src\main.rs:63:17 | 63 | pwm.set_duty(duty_cyclevalue); // Set the duty cycle value | ^^^^^^^^ method not found in `Pwm<'>`

For more information about this error, try rustc --explain E0599. error: could not compile SoftwareMilestone (bin "SoftwareMilestone") due to 2 previous errors

alexandruradovici commented 6 months ago

The PWM driver dors not have that method, please tale a look at PWM lab for the syntax.