[Open_electroporator] pyflex_f401 v0.6 prototype turn on

Nathan McCorkle nmz787 at gmail.com
Sun Jul 15 01:20:33 UTC 2018


On Sat, Jul 14, 2018, 5:34 PM John Griessen <john at cibolo.com> wrote:

> On 07/14/2018 07:13 PM, Nathan McCorkle wrote:
> > You said PB14 is what you expect to stay enabled and off
>
> I prefer to say enabled and active low.


Makes sense, floating is confusable with off... And when the gpio is low it
can sink current so it's more than 'off' implies too.


> # PYFLEX_F401 pin LED_YELLOW,PB9  ==> pyflex_f401.sch LED_YELLOW,PB9
> YEL_LED = Pin('LED_YELLOW', Pin.OUT)
> YEL_LED.value(1)
> # EN_18V_ONBOARD is active LO, (drives base of Q32), so turn on at start.
> EN_18V_ONBOARD = Pin('PB14', Pin.OUT)
> EN_18V_ONBOARD.value(1)
> pyb.delay(900)
>
> YEL_LED.value(0)
> EN_18V_ONBOARD.value(0)
> YEL_LED.value(0)
> pyb.delay(3900)
> EN_18V_ONBOARD.value(1)
> YEL_LED.value(1)
> pyb.delay(1900)
>
> enable_gpio_and_timers()
>

I'd say the code you've written there is readable and short enough, and not
necessarily 'low level' in the sense we at least avoid bit shifting and
bitfields. Will simply moving the last line to be the first line not solve
your trouble?

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cibolo.us/pipermail/open_electroporator/attachments/20180714/4e8bacef/attachment.html>


More information about the open_electroporator mailing list