jmartiuk5 / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
Other
0 stars 0 forks source link

mbed platform: Add LEDs to the PinName lookup table #229

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently, the mbed platform hard codes four instances of DigitalOut in order 
to control the LEDs.  The LEDs can also be controlled by other peripherals such 
as PwmOut.  To do this, the user needs a way to access the LEDs.  Since the 
lookup table currently starts at 5, it is very easy to put the LEDs in slots 
1-4.

This way, the user can do something like this in python code:

p = PwmOut(1)       # LED1
p.period_us(1000)
p.pulsewidth_us(500)

Original issue reported on code.google.com by dwhall...@gmail.com on 20 Feb 2012 at 6:22

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 3c5ab12bb483.

Original comment by dwhall...@gmail.com on 20 Feb 2012 at 6:23