PWM on any pin
Posted: Fri Sep 07, 2018 2:06 am
hi,
I'm following the example <a href="http://docs.micropython.org/en/latest/p ... ">here.</a> it all works well.
When i try to move it to new pin say X8 i run into problems.
I change timer to one on pin X8 but the channel on some is indicated as 1N, how do i present this identifier to pyb.Timer.channel ? which takes a (positive?) integer as it's first argument.
changing the first couple of lines to read
<code>
tim = pyb.Timer(8, freq = 100)
tchannel = tim.channel(1, pyb.Timer.PWM,
pin=pyb.Pin.board.X8, pulse_width = 0)
</code>
results in a flashing LED at about 1-2Hz, which i know isn't good as it should be channel 1N
I'm following the example <a href="http://docs.micropython.org/en/latest/p ... ">here.</a> it all works well.
When i try to move it to new pin say X8 i run into problems.
I change timer to one on pin X8 but the channel on some is indicated as 1N, how do i present this identifier to pyb.Timer.channel ? which takes a (positive?) integer as it's first argument.
changing the first couple of lines to read
<code>
tim = pyb.Timer(8, freq = 100)
tchannel = tim.channel(1, pyb.Timer.PWM,
pin=pyb.Pin.board.X8, pulse_width = 0)
</code>
results in a flashing LED at about 1-2Hz, which i know isn't good as it should be channel 1N