Pan Tilt HAT Issues

Sounds like it could be awry. We’re keeping a close eye on any quality issues with these servos, but right now there seem to be just a couple. I reckon yours is one of them. Did you bung us a support email?

Not yet, I wasn’t totally convinced it wasn’t just my eyes :D

I’ll ping them an email, thanks.

1 Like

Replacement seems a lot better than the previous one, thanks!

Already written a face tracker that scans a room until it finds a face and ‘locks-on’. The mad scientist in me wants to hook up a little Nerf gun :D.

Excited at the potential of this little guy :)

1 Like

I just wrote an unnecessarily long post about exactly this. I granted myself root permission to the init.py file and added the line. I’m at work right now and don’t want to test it without being there to stop it from going bonkers, and also prevent my dogs from freaking out and eating it. I would at least be sure to start recording if that were to happen. I think it was just:

                                   "sudo idle3" 

We’ll see…

Hey team! Very new to this scene and used this hat to build a birdcam using motion so I can watch my bird feeder from the office. I am thinking this is more of a hardware issue than anything, after reading the comments: Using the pre-installed pantilt web server, the first time it is used after being idle, the camera will swing all the way to that direction. ie if it has been idle and I tap right once, it swings as far right it can go. If I hit up, it goes all the way up. This didn’t really bug me at first but it is making my motion sensor freak out and crash now. As well, it seems to freeze and shake at certain positions. I am glad to provide some more information but just wondering if on the face of it this sounds more like a hardware issue

This sounds like a software issue, rather than a hardware issue, are you talking about this PanTilt Web server? https://github.com/pimoroni/pantilt-hat/tree/master/examples/pantiltweb

Hey there, yes this is with the web server, I notice that the PTH jumps to the right when it is first given power. Then the first time the webserver is fired up it works fine, no jumps. Then, if I let it sit (say 15-20 minutes) or if I access the web server from another computer, the first command will make it go all the way to the right if I hit right or left, all the way to the top if I hit up or down. I am guessing that I dont have the positions calibrated correctly, do you have a topic/guide on that?

The jump when it’s first given power is because the servo position initialises to zero on power up- since it can’t know what position the servo is actually in.

I suspect the problem you’re having after 15-20 minutes is similar- especially if you try to access from another computer- since the web server is making no effort whatsoever to keep track of the servo position and send sane commands.

What the server needs to do is keep a log of where it thinks the servo is, and send that information to the client when it connects.

In fact it’s probably sensible for the server to accept only “move left” or “move right” commands etc and apply them as transformations to the position it believes the servo is at. Currently it accepts an angle between 0-180 and trusts that the client is asking sensible things of it.