servo


Author Message
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2260
Posted: 08:48pm 31 Oct 2024      

  matherp said  Try this


PicoMite.zip


Set the pins you want as PWM outputs e.g.

SETPIN GPn,PWM

Then use the servo command

SERVO channel, posA [,posB]

posA and posB can be between -20.0 and 120.0%

Make sure you understand which pins are on which PWM channel (see manual) and note that you can omit posA or posB but not both and if you want just posB then include the extra comma

e.g.

SERVO channel,,posB

This functionality will be part of the 6.00.00 release when finalised


I always used pulse out gcb to control mini servo. not tried on mmbasic, never thought of pwm. 1.5ms is mid position 1ms left to 2 ms right every 20 ms