Search found 288 matches

by Turbinenreiter
Thu Jan 05, 2017 4:44 pm
Forum: General Discussion and Questions
Topic: Implementing a C function that takes a Python function as argument
Replies: 11
Views: 13388

Re: Implementing a C function that takes a Python function as argument

I expanded this quite a bit, supporting different data types now as well as 0 to 1 input arguments. Currently I'm struggling to return arrays. I get a list from MicroPython like so: out_obj = mp_obj_new_list(out_len, mp_call_function_0(fun_table[fun_no])); The items in that list I have to convert to...
by Turbinenreiter
Sun Dec 18, 2016 9:54 pm
Forum: General Discussion and Questions
Topic: Implementing a C function that takes a Python function as argument
Replies: 11
Views: 13388

Re: Implementing a C function that takes a Python function as argument

realloc solved my problem. I don't actually expose the vtable to pythong, rather I have the register function used to register python functions to the dbus append it. I got it working now, but there might even be an easier way, as I by now found a function in sd-bus to add to the vtable. Next step i...
by Turbinenreiter
Sat Dec 17, 2016 10:12 pm
Forum: General Discussion and Questions
Topic: Implementing a C function that takes a Python function as argument
Replies: 11
Views: 13388

Re: Implementing a C function that takes a Python function as argument

I'm now trying to dynamically create the sd_bus_vtable from input I get from the MicroPython script and it really got my head spinning. sd_bus_vtable *test_vtable = NULL; int tab_len = 2; static sd_bus_vtable start = SD_BUS_VTABLE_START(0); static sd_bus_vtable end = SD_BUS_VTABLE_END; STATIC mp_obj...
by Turbinenreiter
Thu Dec 15, 2016 1:50 pm
Forum: General Discussion and Questions
Topic: Implementing a C function that takes a Python function as argument
Replies: 11
Views: 13388

Re: Implementing a C function that takes a Python function as argument

Thank you!

I can now register a method and run a dbus Service from MicroPython.
by Turbinenreiter
Wed Dec 14, 2016 12:43 pm
Forum: General Discussion and Questions
Topic: Implementing a C function that takes a Python function as argument
Replies: 11
Views: 13388

Implementing a C function that takes a Python function as argument

I'm experimenting with writing a dbus module for the unix port of MicroPython, but the question is a general one, so just ignore the dbus variable names. Consider the following code: STATIC mp_obj_t mod_dbus_test(mp_obj_t input) { return; } STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_dbus_test_obj, mod_dbu...
by Turbinenreiter
Fri Dec 09, 2016 12:35 pm
Forum: Other Boards
Topic: Feather pyboard
Replies: 8
Views: 8840

Re: Feather pyboard

So the board came today and it's pretty much dead in the water. Can't get it in DFU mode, can't program it over st-link. There was an error in the power supply, but that is fixed and the microcontroller get's stable 3V3. :cry: /edit: oh man, I just connected a battery and the charging chip burned ou...
by Turbinenreiter
Wed Nov 02, 2016 12:10 pm
Forum: Other Boards
Topic: Feather pyboard
Replies: 8
Views: 8840

Re: Feather pyboard

22ohm resistance between D-/PA10, D+/PA12 is needed.
Will add.
Here is my PYB Nano board, it use STM32F401CE/STM32F411CE.
Do you have a schematic?

My biggest problem right now is finding a small 8MHz crystal.
by Turbinenreiter
Tue Nov 01, 2016 6:59 pm
Forum: Other Boards
Topic: Feather pyboard
Replies: 8
Views: 8840

Feather pyboard

I really like Adafruits Feather form factor. I really like MicroPython. I really like STM32F4. I really like KiCad. https://raw.githubusercontent.com/turbinenreiter/Feather-pyboard/master/Feather-Pyboard.png (if someone has a .wrl for the JST-PH connector ...) This is my first design of such complex...
by Turbinenreiter
Mon Oct 31, 2016 9:49 pm
Forum: Drivers for External Components
Topic: Driver for BMX055
Replies: 3
Views: 5441

Re: Driver for BMX055

The driver for the MPU9250 is progressed further then the BMX055 driver (I co-wrote both them). On the BMX, the accel is done, gyro and magnetometer are missing. Both are maintained, so if you have issues, we are here (and on GitHub) to work with you. I came to prefer the BMX055 to the MPU9250. It h...