[Open_electroporator] G30th F401 board makes controlled bursts of pulses
Nathan McCorkle
nmz787 at gmail.com
Sat Aug 20 01:39:50 UTC 2016
On Fri, Aug 19, 2016 at 7:15 AM, John Griessen <john at cibolo.com> wrote:
> I debugged my pulser code and found I was blocked with no pythonic or
> loopy-code-construct explanation and thought
> maybe I was a clueless coder. Lucky me... It was a bug in micropython:
> https://forum.micropython.org/viewtopic.php?f=2&t=2283
Wow, well hopefully the fix gets integrated soon enough to reflash,
especially if a workaround it too odd/slow (code wise). I haven't been
following the code closely lately, my mind has been in a space of
learning logic to apply numeric solvers to constraints problems. Very
mathy and different-to-me stuff. It is going well though... I will try
to take a look at what you are doing in more detail this weekend.
>
> So, in a while, I will be testing with bursts of pulses that won't
> auto-repeat by the expedient of resetting the circuit often.
Can you do this with some blocking loops instead of ISRs? (my ignorant
of the details, quick response) Something like:
for pulse in range(num_pulses_requested):
pin1.toggle()
delay(pulse_width)
pin1.toggle()
# maybe add some NOPs here to account for the JMP that will happen
at the end of the loop
delay(delay_between_pulses)
pin2.toggle()
delay(pulse_width)
pin2.toggle()
delay(delay_between_pulses)
I'll study your code sometime this weekend and try to give a more
informed response :)
More information about the open_electroporator
mailing list