Shop OBEX P1 Docs P2 Docs Learn Events
Multiple PWM outputs for quadrotor — Parallax Forums

Multiple PWM outputs for quadrotor

Hey everyone,

This is my first post so please forgive me if I placed it in the wrong category.

Problem:
I’m trying to figure out how to use pwm_start and pwm_set for 4 output pwm signals. I do understand how it works for 2 outputs using pwm_set with channels 0 and 1. I am using simpleIDE as I am more comfortable with C.

I’ve looked around and it seems these commands are limited to 2 channels only. Would there be an alternative? Thanks for your help

Comments

  • The P1 has two counters per cog that can be used for precision PWM -- this is where the limit of 2 comes from. Not a problem, though, just run two instances of that object.

  • The flight control software is very complex and hard to follow but does work.

    I hope you found in simpleIDE the Help - simple library reference --> there are number of good library functions there.

    You could launch two cogs and then you would be able to start two pwm functions that way or you could just use the servo.h library as servos kind of work like rotors.

    Mike

Sign In or Register to comment.