Search found 2015 matches

by jimmo
Sat Jun 08, 2019 1:43 am
Forum: Pyboard D-series
Topic: Software I2C pull up for pyboard D?
Replies: 9
Views: 1954

Re: Software I2C pull up for pyboard D?

You should be able to use the optional pull-ups (on X) at least. Can you share the exact code you used to set the pins high? (e.g. I always forget to pass Pin.OUT to the constructor).
by jimmo
Fri Jun 07, 2019 9:55 pm
Forum: Other Boards
Topic: STM32L072KBU3
Replies: 5
Views: 1246

Re: STM32L072KBU3

the C code is fairly simple, would it be even worth doing this in MicroPython and is it going to be able to run uninterrupted for days/weeks at 921600 baud? (pun sort of intended, sub-question is whether this board+uPy would be fast enough to use polling or is it only going to run properly when int...
by jimmo
Fri Jun 07, 2019 5:52 am
Forum: MicroPython pyboard
Topic: Import Pyserial Module
Replies: 10
Views: 2890

Re: Import Pyserial Module

Hi, pyserial is a library for "big" Python (CPython). On an embedded device, you'll likely be achieving the same result using a UART directly. https://docs.micropython.org/en/latest/library/machine.UART.html and https://docs.micropython.org/en/latest/pyboard/quickref.html#uart-serial-bus The UART ID...
by jimmo
Fri Jun 07, 2019 5:48 am
Forum: ESP32 boards
Topic: HTTP server - query string
Replies: 1
Views: 542

Re: HTTP server - query string

Hi,

You'll find it a lot easier to use one of the HTTP server libraries instead of sockets directly. Here's a good one https://github.com/miguelgrinberg/microdot

The author has also started writing some great tutorials too -- https://blog.miguelgrinberg.com/
by jimmo
Thu Jun 06, 2019 10:40 pm
Forum: General Discussion and Questions
Topic: Need help freeing memory from unused modules
Replies: 13
Views: 2086

Re: Need help freeing memory from unused modules

If you're feeling adventurous, frozen modules are a good way to claim some RAM back, but you will need to build your own firmware images.
by jimmo
Thu Jun 06, 2019 10:19 pm
Forum: Other Boards
Topic: STM32F407VE: mpy-cross ValueError with @micropython.native decorator
Replies: 3
Views: 781

Re: STM32F407VE: mpy-cross ValueError with @micropython.native decorator

For some extra background, an .mpy file is platform agnostic -- it just contains MicroPython bytecode that run anywhere. But when you use @native, it has to know which architecture to emit native machine code for. This is the purpose of the march flag. Unfortunately you end up with a platform-specif...
by jimmo
Thu Jun 06, 2019 10:06 pm
Forum: General Discussion and Questions
Topic: Need help freeing memory from unused modules
Replies: 13
Views: 2086

Re: Need help freeing memory from unused modules

I guess it's making two objects if I get rid of the 'del res' line. There's a brief moment where there are two objects. Think of it like this. a = big_thing() a = big_thing() is really the same as tmp = big_thing() a = tmp del tmp tmp = big_thing() # now we have a and tmp pointing to separate big t...
by jimmo
Thu Jun 06, 2019 10:17 am
Forum: Development of MicroPython
Topic: MicroPython external C modules
Replies: 3
Views: 937

Re: MicroPython external C modules

The command : " make USER_C_MODULES=../../../modules CFLAGS_EXTRA=-DMODULE_EXAMPLE_ENABLED=1 all " dosen't work. Are you using ESP32 by any chance? For some reason the ESP32 makefile doesn't use CFLAGS_EXTRA. I don't have an ESP32 board or the ESP32 toolchain set up but maybe you could send a PR?
by jimmo
Thu Jun 06, 2019 10:10 am
Forum: ESP32 boards
Topic: SPI hardware
Replies: 5
Views: 1246

Re: SPI hardware

Also check that the cs pin is initialized with Pin.OUT.
by jimmo
Thu Jun 06, 2019 10:08 am
Forum: Pyboard D-series
Topic: Nut mounted to bottom of sensor tile
Replies: 2
Views: 695

Re: Nut mounted to bottom of sensor tile

Are the screw size and thread pitch for the nut that is mounted to the bottom of the sensor tile available? It mates up to the holes in the back plane board. I searched the documentation unsuccessfully. I'm fairly sure they're M1.6 thread. The 3D model in the reference schematics is SMTSO-M1.6-1ET-...