Skip to content

Issues with Tilt and Waveshare HAT #17

@Azulkan

Description

@Azulkan

Hello, thank you for the great work, it makes things really easy.
I've run into some problems with the tilt functionality though. This may be me misunderstanding something with the code, so let me explain the issue:

I use the Waveshare HAT, I mounted it easily with their official guide making - I think - no mistakes during the process.
In this configuration, the pan servo can turn 180°, but the tilt servo has a narrower range. In my case, I've found that it can rotate securely from 10° to 60°. With more than that, it is blocked by the pan servo, making noise and a lot of heat.

I've found no use of the angle_low and angle_high (tilt) config params in the code, whereas the angle_min and angle_max (pan) are used here.

I think using the same SERVO_OFFSET for both pan & tilt in this line thus causes the servo to rotate too far.

In these lines, the pan angle is used for tilt, which I believe is an error:

self.pAngle=self.Offset
self.servos.setRotationAngle(PAN,self.pAngle)
self.tAngle=self.Offset
self.servos.setRotationAngle(TILT,self.pAngle)

I ended removing all the "offset" things for tilt - and kept them for pan - to make things work in my configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions