Search found 149 matches

by gratefulfrog
Sat Sep 03, 2016 4:16 pm
Forum: General Discussion and Questions
Topic: Accelerometer instantiation creates interrupts?
Replies: 21
Views: 15393

Re: Accelerometer instantiation creates interrupts?

Thanks for the reply! So you're saying that if I instantiate the Accel, I lose the use of pins X9 and X10, is that correct? I ask, because my project is nearly finished, and if I lose the use of 2 pins, I'm in a real pickle.... Could those pins be used for input or output, while the Accel is instant...
by gratefulfrog
Sat Sep 03, 2016 2:14 pm
Forum: General Discussion and Questions
Topic: Accelerometer instantiation creates interrupts?
Replies: 21
Views: 15393

Re: Accelerometer instantiation creates interrupts?

Further investigation shows that even if the Accel instance is created first, then we create ExtInts on pins X9 and X10, the accelerometer seems to be disabled.... and only reads a constant value of 4 on all three axes! >>> from pyb import ExtInt,Pin,Accel >>> a=Accel() >>> a.x() -17 >>> a.x() -18 >...
by gratefulfrog
Sat Sep 03, 2016 1:24 pm
Forum: General Discussion and Questions
Topic: Accelerometer instantiation creates interrupts?
Replies: 21
Views: 15393

Accelerometer instantiation creates interrupts?

Hi, I'm back with an intriguing issue: It seems that under specific circumstances, instantiation of the pyb.Accel class triggers any interrupts on pins X9 and X10, i.e. lines 6 and 7. Examine this code: >>> from pyb import ExtInt,Pin,Accel >>> def callback(line): ... print(line) ... >>> ints = [ExtI...
by gratefulfrog
Fri Sep 02, 2016 11:06 am
Forum: General Discussion and Questions
Topic: strange behaviour...
Replies: 13
Views: 10224

Re: strange behaviour...

Hi Damien! It is my pleasure to help in any way! And you're right, this bug could have shown up at any time and was excruciatingly hard to find, for me anyway, because of so many interacting elements: worked fine on linux, worked fine from ram or from flash but only when combing them would it show u...
by gratefulfrog
Thu Sep 01, 2016 1:04 pm
Forum: General Discussion and Questions
Topic: strange behaviour...
Replies: 13
Views: 10224

Re: strange behaviour...

Well, I would normally jut seek a workaround too, but this time understanding the bug took so much effort that once I had done all that, I felt that I owed it to the community to help to fix it... Although, perhaps it is not a bug in micropython, but in my code... But to support the bug hypothesis, ...
by gratefulfrog
Thu Sep 01, 2016 12:27 pm
Forum: General Discussion and Questions
Topic: strange behaviour...
Replies: 13
Views: 10224

Re: strange behaviour...

I have just submitted an issue to the github repo:

Dictionaries in frozen code behave wrongly when accessed with non-frzoen string keys #2378

I also posted "minimal??" code that is need to reproduce the error.

I attach it here as well.

Let me know!

Ciao,
Bob
by gratefulfrog
Thu Sep 01, 2016 10:51 am
Forum: General Discussion and Questions
Topic: strange behaviour...
Replies: 13
Views: 10224

Re: strange behaviour...

Producing a test case can be hard work You ar right about that! I've been working on the test case fo 5 hours, and only now can I consistently produce the error in a practical way! It seems to have something to do with strings that are loaded from frozen code vs. strings that are loaded from openin...
by gratefulfrog
Wed Aug 31, 2016 4:50 pm
Forum: General Discussion and Questions
Topic: strange behaviour...
Replies: 13
Views: 10224

Re: strange behaviour...

That's because the original dictionary is built in a much more complex manner. It is not simply assigned as you did in you example... I will try to make a set of files that can be used to replicate the bug systematically and attach them, but now I've got to run... I assure you, that there is still a...
by gratefulfrog
Wed Aug 31, 2016 4:13 pm
Forum: General Discussion and Questions
Topic: strange behaviour...
Replies: 13
Views: 10224

Re: strange behaviour...

I am aware of that, but I was using that to illustrate the bug...

I am now pretty much convinced this is related to the bug #523...
by gratefulfrog
Wed Aug 31, 2016 3:53 pm
Forum: General Discussion and Questions
Topic: strange behaviour...
Replies: 13
Views: 10224

Re: strange behaviour...

This may be related to: dict map lookup error with str key #523 ??

Any help would be urgently appreciated!