Search found 31 matches

by wwsheldons
Thu Mar 01, 2018 1:57 pm
Forum: General Discussion and Questions
Topic: timer isr function problem
Replies: 8
Views: 974

Re: timer isr function problem

g.value(not (not seq[loc])) its for changing the element in seq to the logic variable, which can be accepted by g.value(). @micropython.viper def func(loc: int, N_seq: int): g.value(not (not seq[loc])) loc = (loc + 1) % N_seq as above program , why not set the variable "seq" and "g" in the input pa...
by wwsheldons
Thu Mar 01, 2018 12:48 am
Forum: General Discussion and Questions
Topic: timer isr function problem
Replies: 8
Views: 974

Re: timer isr function problem

Just out of curiosity and not that it would make any sense. If I try on my pyboard: from pyb import Pin, Timer g = Pin(Pin('Y10'), Pin.OUT_PP) @micropython.viper def tick(t): g(not g()) t4=Timer(4, freq=100000) t4.callback(tick) I get 50 kHz on Y10 and REPL is still responding. my whole question is...
by wwsheldons
Thu Mar 01, 2018 12:40 am
Forum: General Discussion and Questions
Topic: timer isr function problem
Replies: 8
Views: 974

Re: timer isr function problem

Just out of curiosity and not that it would make any sense. If I try on my pyboard: from pyb import Pin, Timer g = Pin(Pin('Y10'), Pin.OUT_PP) @micropython.viper def tick(t): g(not g()) t4=Timer(4, freq=100000) t4.callback(tick) I get 50 kHz on Y10 and REPL is still responding. no, I get 35.78KHz o...
by wwsheldons
Wed Feb 28, 2018 1:47 pm
Forum: General Discussion and Questions
Topic: timer isr function problem
Replies: 8
Views: 974

timer isr function problem

g = Pin(Pin('Y10'), Pin.OUT_PP)
def tick4(timer):
global g
g.value(not g.value())

tim4 = Timer(4, freq=100000)
tim4.callback(tick4)

the program is above, but if I use the Oscilloscope to see the freq of Pin('Y10') , the value is 14.59KHz. so why? it is why not 50KHz.
by wwsheldons
Thu Jun 23, 2016 3:02 am
Forum: General Discussion and Questions
Topic: problem with reboot by reboot button or ctrl D
Replies: 1
Views: 1115

problem with reboot by reboot button or ctrl D

when I reboot the pyboard V3 by reboot button or ctrl+D, the LEDR2 will flash for few minutes, while the board doing not work. But sometimes the board will reboot immediately. what's this and why?
by wwsheldons
Sat Jun 11, 2016 8:48 am
Forum: General Discussion and Questions
Topic: Can I use the can.recv(0) in the rxcallback function?
Replies: 10
Views: 3719

Re: Can I use the can.recv(0) in the rxcallback function?

Yes it should be possible to use it in all interrupt functions. The intention is that all callbacks will have the option to be soft. Next in queue is extint. If you find any bugs or comes up with any possible improvments while using this, please report them here or even better in the PR at github. ...
by wwsheldons
Sat Jun 11, 2016 1:11 am
Forum: General Discussion and Questions
Topic: Can I use the can.recv(0) in the rxcallback function?
Replies: 10
Views: 3719

Re: Can I use the can.recv(0) in the rxcallback function?

PappaPeppar wrote:Add the line

Code: Select all

#define MICROPY_PY_SOFTIRQ          (1)
To boards/PYBV3/mpconfigboard.h

I only have V10 boards, so thats the only one I have tried it on.

thank you , it works well . Could I use the function setsoftirq on the Timer callback?
by wwsheldons
Fri Jun 10, 2016 8:50 am
Forum: General Discussion and Questions
Topic: Can I use the can.recv(0) in the rxcallback function?
Replies: 10
Views: 3719

Re: Can I use the can.recv(0) in the rxcallback function?

PappaPeppar wrote:folke is right, the soft irq feature does only exist in my repository https://github.com/HenrikSolver/micropy ... e/softirq2 so far.

I rebuild the source from micropython-softirq2 by using "make BOARD=PYBV3", then the modoule of machine has no the attribute 'setsoftirq'. why?
by wwsheldons
Fri Jun 10, 2016 8:14 am
Forum: General Discussion and Questions
Topic: Can I use the can.recv(0) in the rxcallback function?
Replies: 10
Views: 3719

Re: Can I use the can.recv(0) in the rxcallback function?

PappaPeppar wrote:folke is right, the soft irq feature does only exist in my repository https://github.com/HenrikSolver/micropy ... e/softirq2 so far.

thanks very much
by wwsheldons
Tue Jun 07, 2016 11:35 am
Forum: General Discussion and Questions
Topic: about re module
Replies: 6
Views: 2149

Re: about re module

Besides the problem of anchored and non-anchored search, there seems to be a problem with the data. I tried to split up a in to lines and search/match these against the search pattern, with no success. Using a text with only ASCII character works. So it may be related to what your searching at. Try...