Skip to content
New issue

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

User servo with Pico #694

Closed
eleimt opened this issue Jul 19, 2024 · 2 comments
Closed

User servo with Pico #694

eleimt opened this issue Jul 19, 2024 · 2 comments
Labels
question Further information is requested

Comments

@eleimt
Copy link

eleimt commented Jul 19, 2024

Hello
Tell me please, how use servo.go with Pico? I have this code:

package main

import ...

func main() {
	srv, err := servo.New(machine.PWM0, machine.GP16)
	if err != nil {
		println(err.Error())
	}

	for i := 0; i <= 180; i++ {
		srv.SetAngle(i)
		time.Sleep(time.Millisecond * 2)
	}
}

But servo works in jerks..
https://www.friendlywire.com/projects/ne555-servo-safe/SG90-datasheet.pdf

video_2024-07-19_20-50-15

@deadprogram
Copy link
Member

@eleimt please see Servo example in repo:

https://github.com/tinygo-org/drivers/blob/release/examples/servo/servo.go

@deadprogram deadprogram added the question Further information is requested label Jul 20, 2024
@eleimt
Copy link
Author

eleimt commented Jul 20, 2024

@deadprogram Hi, thanks, I find problem. Problem was not in code.

@eleimt eleimt closed this as completed Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants