Search found 2374 matches

by dhylands
Fri Jun 23, 2017 11:23 pm
Forum: Development of MicroPython
Topic: Mapping between Micropython and C
Replies: 1
Views: 24

Re: Mapping between Micropython and C

You probably want to read this thread: https://forum.micropython.org/viewtopic.php?f=16&t=2861&p=19206 You can find the mapping here: https://github.com/micropython/micropython/blob/b50659e13775fbf44c5b8f4b1261fc8f46635321/stmhal/i2c.c#L1018 The scan is an entry in the locals dict, which is ...
by dhylands
Fri Jun 23, 2017 11:16 pm
Forum: Other Boards
Topic: Nucleo and adding code to main.py
Replies: 11
Views: 277

Re: Nucleo and adding code to main.py

You may want to install nano (I'm pretty sure that nano is available under cygwin) and learn that instead. nano is generally much easier to learn than vim. There are a variety of ways to tell rshell which editor to use.
by dhylands
Thu Jun 22, 2017 4:35 pm
Forum: The MicroPython pyboard
Topic: pyboard not detected after firmware update
Replies: 3
Views: 61

Re: pyboard not detected after firmware update

You message seems to imply that you downloaded the pyboard firmware from ST? You should be downloading the pyboard firmware from: http://micropython.org/download Make sure you download an image that starts with pybv11 for the pyboard v1.1 board. The 1.1 and 1.0 boards have different frequency crysta...
by dhylands
Wed Jun 21, 2017 7:30 pm
Forum: Other Boards
Topic: Nucleo and adding code to main.py
Replies: 11
Views: 277

Re: Nucleo and adding code to main.py

You have some options. 1 - Use a tool like rshell which works over the USB link and allows files to be manipulated 2 - Do a filesystem reset (which will wipe all of the files) http://docs.micropython.org/en/latest/pyboard/pyboard/general.html#boot-modes 3 - Write a python script which creates a new ...
by dhylands
Wed Jun 21, 2017 1:20 am
Forum: Other Boards
Topic: Black STM32F407VET6 + STM32F407ZET6 dev boards
Replies: 37
Views: 2430

Re: Black STM32F407VET6 + STM32F407ZET6 dev boards

The Accel module is designed for the MMA7660 accelerometer on the pyboard. There is a driver for the ST accelerometer included on the STM32F4DISC in the stmhal/boards/STM32F4DISC directory called staccel.py: https://github.com/micropython/micropyt ... staccel.py
by dhylands
Tue Jun 20, 2017 8:20 pm
Forum: Development of MicroPython
Topic: Eclipse setup - missing definitions
Replies: 2
Views: 66

Re: Eclipse setup - missing definitions

You'd need to write a script which expands the QDEF macros. You can see in py/qtr.h https://github.com/micropython/micropython/blob/c06aa5be00139dcb5fc8a47da5e38734355981e2/py/qstr.h#L39-L46 the following: enum { #ifndef NO_QSTR #define QDEF(id, str) id, #include "genhdr/qstrdefs.generated.h&qu...
by dhylands
Tue Jun 20, 2017 4:38 pm
Forum: Other Boards
Topic: Nucleo and adding code to main.py
Replies: 11
Views: 277

Re: Nucleo and adding code to main.py

The pyb.usb_mode command only works when used from within boot.py.

The order of initialization is:
- run boot.py
- initialize USB
- run main.py
- enter REPL

In order to actually affect the USB mode, pyb.usb_mode needs to be called before the USB is initialized.
by dhylands
Mon Jun 19, 2017 12:58 am
Forum: The MicroPython pyboard
Topic: pyboard UART -> GSM SIM800l module. Command responses aren't consistent
Replies: 8
Views: 315

Re: pyboard UART -> GSM SIM800l module. Command responses aren't consistent

When you say a signal is high, what you're really saying is that that the voltage of the signal is 3.3v higher than the ground voltage. If you don't connect the grounds and the grounds between the two devices are at differential voltages relative to each other, then what looks like a high signal to ...
by dhylands
Thu Jun 08, 2017 5:54 pm
Forum: Other Boards
Topic: Nucleo and adding code to main.py
Replies: 11
Views: 277

Re: Nucleo and adding code to main.py

I wrote a utility called rshell which can be used over USB or serial for viewing/copying files to/from a pyboard. https://github.com/dhylands/rshell If using it over a serial link, then you should use --buffer-size=32 You can also use frozen files, which will get linked in with the micropython image...
by dhylands
Tue Jun 06, 2017 2:11 am
Forum: General Discussion and Questions
Topic: how to call c method which accepts structure as parameter from Micropython loading lib.so file
Replies: 2
Views: 118

Re: how to call c method which accepts structure as parameter from Micropython loading lib.so file

I know that you can pass a pointer to struct. I don't think ffi supports passing a struct by value.

Go to advanced search