Search found 1681 matches

by jimmo
Mon Jul 06, 2020 2:30 am
Forum: Development of MicroPython
Topic: Pull request failed - code formatting
Replies: 2
Views: 42

Re: Pull request failed - code formatting

You can run the code formatter locally using tools/codeformat.py (you'll need to have "black" and "uncrustify" installed).
by jimmo
Mon Jul 06, 2020 2:26 am
Forum: Other Boards
Topic: [nRF52832] Store python code on chip
Replies: 1
Views: 23

Re: [nRF52832] Store python code on chip

MicroPython provides a filesystem backed by the device flash. You can store your code there (and main.py will be executed at startup). To access the filesystem remotely (i.e. to transfer files) you can do this over the UART (or USB UART) used by the REPL using http://docs.micropython.org/en/latest/r...
by jimmo
Sat Jul 04, 2020 6:54 am
Forum: Programs, Libraries and Tools
Topic: Getting error when using 'with' on socket
Replies: 2
Views: 68

Re: Getting error when using 'with' on socket

I assume that's supposed to read: with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: It appears that this isn't supported in MicroPython (on any of the ports that support sockets), but it certainly does seem like a useful thing to support (and at a fairly low implementation cost). Raised a...
by jimmo
Sat Jul 04, 2020 6:37 am
Forum: General Discussion and Questions
Topic: KeyError that I don't Understand
Replies: 1
Views: 52

Re: KeyError that I don't Understand

On current github version of MicroPython this works fine. MicroPython v1.12-618-gfeed2a046 on 2020-07-03; linux version Use Ctrl-D to exit, Ctrl-E for paste mode >>> CONTROLLER_CONFIG = { ... 'ID': 1986, ... 'CE': 1, ... 'NI': 'Controller', ... 'AP': 4 ... } >>> def configure_node(**kwargs): ... for...
by jimmo
Sat Jul 04, 2020 6:27 am
Forum: Programs, Libraries and Tools
Topic: ubluetooth does not decode advertising payloads
Replies: 5
Views: 137

Re: ubluetooth does not decode advertising payloads

Yep, that's exactly right. The advertising payload and the actual set of gatt services is completely independent. The services listed in the advertising payload are just a hint to the scanner about what the device's capabilities are (to avoid needing to connect to a device to discover them fully). R...
by jimmo
Sat Jul 04, 2020 6:23 am
Forum: General Discussion and Questions
Topic: Remote Control Vs. Microcontrollers
Replies: 3
Views: 111

Re: Remote Control Vs. Microcontrollers

If a weed whacker is the same as what we call whipper snippers then that's going to be quite a powerful motor. For a larger motor you'd be better off using a proper electronic speed controller (ESC). You can get them for DC and brushless motors, and they are controlled by (you guessed it) PWM just l...
by jimmo
Fri Jul 03, 2020 6:01 am
Forum: General Discussion and Questions
Topic: Remote Control Vs. Microcontrollers
Replies: 3
Views: 111

Re: Remote Control Vs. Microcontrollers

What is a good way to learn electronics / automation? Youtube :) No kidding, there's so much good stuff available now, really the main problem is figuring out what to search for. One great starting place is the EEVBlog channel. I'm planning on building a remote controlled (RC) rover type vehicle, a...
by jimmo
Fri Jul 03, 2020 5:55 am
Forum: General Discussion and Questions
Topic: STMicroelectronics device having dfu mode i want to detect serial number using python. i'm not getting any soluton.
Replies: 7
Views: 345

Re: STMicroelectronics device having dfu mode i want to detect serial number using python. i'm not getting any soluton.

Are you on Linux? does `dmesg` show anything when you connect the device?

Does `sudo dfu-util --list` help? If so you might need to check your udev rules.
by jimmo
Fri Jul 03, 2020 5:52 am
Forum: Programs, Libraries and Tools
Topic: ubluetooth - Question regarding event codes and subscribing to notifying characteristics
Replies: 9
Views: 286

Re: ubluetooth - Question regarding event codes and subscribing to notifying characteristics

Nonetheless I am only returning empty services for the scanned devices except for the Corona warn characteristic of a nearby smartphone. I'm not quite sure what question you're asking. Earlier in the thread we were talking about finding the CCCB descriptor on a gatt server, but sounds now like we'r...