Search found 2261 matches

by dhylands
Mon Mar 27, 2017 3:33 am
Forum: Development of MicroPython
Topic: what tools generate "qstr.i.last" file
Replies: 1
Views: 7

Re: what tools generate "qstr.i.last" file

CPP is the C pre-processor. make provides a default definition of CPP which is defined to be $(CC) -E You can see this if you do: 2145 >make -p | grep -w CPP CPP = $(CC) -E $(CPP) $(QSTR_GEN_EXTRA_CFLAGS) $(CFLAGS) $^ >$(HEADER_BUILD)/qstr.i.last; \ $(CPP) $(QSTR_GEN_EXTRA_CFLAGS) $(CFLAGS) $? >$(HE...
by dhylands
Fri Mar 24, 2017 6:25 pm
Forum: The MicroPython pyboard
Topic: Can't Save main.py
Replies: 3
Views: 63

Re: Can't Save main.py

For developing, I tend not to bother with main.py and instead put my code in some other file like foo.py and then from the REPL do: import foo If that doesn't work, then I'll hit Control-D, copy the file, hit Control-D and redo the import. Well, that's what I did before rshell anyways. Now I use rsh...
by dhylands
Fri Mar 24, 2017 4:13 pm
Forum: The MicroPython pyboard
Topic: Read ADC without reinitializing channel
Replies: 10
Views: 299

Re: Read ADC without reinitializing channel

Hi Felix, The mapping of the ADC to the pins is documented in the stm32 datasheet. This is then reflected in the stm32f405_af.csv file. If you look at this: https://github.com/micropython/micropython/blob/master/stmhal/boards/stm32f405_af.csv and scroll over to the very right (you'll probably need t...
by dhylands
Fri Mar 24, 2017 3:59 pm
Forum: The MicroPython pyboard
Topic: Can't Save main.py
Replies: 3
Views: 63

Re: Can't Save main.py

I've honestly never seen that error before.

Some additional information might be useful:
1 - You mention pyboard, so I'll assume that you're using the real pyboard (STM32F405)
2 - What host are you using (Windows, linux, Mac)
3 - How are you trying to copy the file?
by dhylands
Fri Mar 24, 2017 3:56 pm
Forum: The MicroPython pyboard
Topic: Dealing with Noisy/False reading touch sensing button
Replies: 2
Views: 44

Re: Dealing with Noisy/False reading touch sensing button

If you're in a room with flourescent lights, then the human body will transfer the 60 Hz signal from the lights to the touch plate.

1 cycle of 60 Hz is roughly 16 msecs. So your logic should probably ignore changes which are smaller than that.
by dhylands
Fri Mar 24, 2017 5:39 am
Forum: General Discussion and Questions
Topic: How small can microPython get?
Replies: 2
Views: 81

Re: How small can microPython get?

The minimal target is the smallest target.

It seems to be about 150K
by dhylands
Fri Mar 24, 2017 12:05 am
Forum: The WiPy
Topic: Looking for terminator in data drom UART
Replies: 1
Views: 27

Re: Looking for terminator in data drom UART

I suspect that you're being tripped up by the difference between strings and bytestrings. The UART returns bytestrings, so you should be searching for b'\r' MicroPython v1.8.7-201-ga34ff35 on 2017-02-07; linux version Use Ctrl-D to exit, Ctrl-E for paste mode >>> data = b'abc\rdef' >>> data.find('\r...
by dhylands
Thu Mar 23, 2017 4:39 pm
Forum: General Discussion and Questions
Topic: C enviroment that can read python occasionally, is micropython what I want?
Replies: 12
Views: 195

Re: C enviroment that can read python occasionally, is micropython what I want?

Ok, makes sense on Python functions returning, but what about C functions from Python? Possible? Libraries? For example: In C: function fooC (uint8_t a) { return a; } Can I call fooC(value) from a Python script? Not directly. C functions which are callable from python have to be registered with the...
by dhylands
Wed Mar 22, 2017 4:37 pm
Forum: Other Boards
Topic: How can I increase the callback priority/importance on my Timer? (STM32F401)
Replies: 12
Views: 168

Re: How can I increase the callback priority/importance on my Timer? (STM32F401)

I did some analysis of how long it takes for timer IRQs to be processed a while back: http://forum.micropython.org/viewtopic.php?f=2&t=829&start=10#p4781 What you really need is to toggle a GPIO at the beginning of the ISR and at the end so that you can see how long the ISR is actually takin...

Go to advanced search