
Thank you chrismas9, that example was just what I needed!
I appreciated your LED current limiting calculations too, but that was not my issue.
The problem was I could not find how to reference the pyboard pins, as I had an error when I typed:
[code]from machine import Pin, Signal
led1_pin = Pin(0, Pin.OUT)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>[/code]
But have not worked it out. I've now sorted it:
[code]from machine import Pin, Signal
led1_pin = Pin('X1', Pin.OUT)
led1_pin.value(1)
led1_pin.value(0)[/code]
I've just also worked out that this does the same:
[code]from pyb import Pin
p_out = Pin('X1', Pin.OUT_PP)
p_out.high()
p_out.low()[/code]
So I guess I need to find out the difference between pyb & machine...
Just found my answer to that here:
viewtopic.php?t=2056
Thank you for your help!
Rob.