Search found 3821 matches

by dhylands
Fri Dec 17, 2021 6:49 pm
Forum: ESP32 boards
Topic: ESP32 library for displays 1602, 2004, MT-20S4M (I2C interface) with Russian letters (Cyrillic)
Replies: 11
Views: 16396

Re: ESP32 library for displays 1602, 2004, MT-20S4M (I2C interface) with Russian letters (Cyrillic)

What's the output of the following?

Code: Select all

import binascii
print(binascii.hexlify("The string with your characters here"))
by dhylands
Fri Dec 17, 2021 12:07 am
Forum: MicroPython pyboard
Topic: Can't use VCP+HID mode
Replies: 6
Views: 26429

Re: Can't use VCP+HID mode

This may have some clues for you: viewtopic.php?f=2&t=7170&p=40980#p40755
by dhylands
Thu Dec 16, 2021 10:39 pm
Forum: MicroPython pyboard
Topic: Can't use VCP+HID mode
Replies: 6
Views: 26429

Re: Can't use VCP+HID mode

That worked for me. I had to unplug and replug the Pyboard. I happen to be running 1.15: MicroPython v1.15-126-g29718221d-dirty on 2021-05-18; PYBv1.1 with STM32F405RG Type "help()" for more information. >>> pyb.usb_mode() 'VCP+HID' >>> I get the same results on 1.17: MicroPython v1.17-123-g7f143444...
by dhylands
Thu Dec 16, 2021 9:00 pm
Forum: MicroPython pyboard
Topic: Can't use VCP+HID mode
Replies: 6
Views: 26429

Re: Can't use VCP+HID mode

You need to change usb_mode in boot.py. Changing it in main.py or later (like in the REPL) has no effect.
by dhylands
Thu Dec 16, 2021 6:00 pm
Forum: ESP32 boards
Topic: ESP32 library for displays 1602, 2004, MT-20S4M (I2C interface) with Russian letters (Cyrillic)
Replies: 11
Views: 16396

Re: ESP32 library for displays 1602, 2004 (I2C interface) with Russian letters (Cyrillic)

I haven't really dealt with non-ASCII characters, but my understanding is that micropython strings are UTF8 encoded, and the LCD isn't. So you'll need to translate your strings from UTF8 to the codeset needed by the LCD. Can you provide some examples of what you're trying to do, and elaborate on wha...
by dhylands
Tue Dec 14, 2021 10:28 pm
Forum: General Discussion and Questions
Topic: Epoch date/time is the same for all MCU's..?
Replies: 10
Views: 23567

Re: Epoch date/time is the same for all MCU's..?

Micropython small ints allow for 30 bits of positive value, which translates to about 34 years, so a 2000 epoch gets you years from 1966 thru to 2034.

So I think that the 2000 epoch was chosen to allow dates & times to still be used with small ints.
by dhylands
Tue Dec 14, 2021 8:13 pm
Forum: Development of MicroPython
Topic: Servo in STM32 port
Replies: 4
Views: 24088

Re: Servo in STM32 port

If you look at servo.c you'll see that the entire file is wrapped in a #if MICROPY_HW_ENABLE_SERVO: https://github.com/micropython/micropython/blob/1b7eee24eb024ee3822db341c3447423a684b84f/ports/stm32/servo.c#L35 The pyboard enables it in it's mpconfigboard.h file: https://github.com/micropython/mic...
by dhylands
Thu Dec 09, 2021 9:11 pm
Forum: General Discussion and Questions
Topic: Getting Started - Compile and build the code
Replies: 3
Views: 6702

Re: Getting Started - Compile and build the code

Under ubuntu the packages are named the same as under Debian: $ apt-cache search arm-none-eabi binutils-arm-none-eabi - GNU assembler, linker and binary utilities for ARM Cortex-R/M processors gcc-arm-none-eabi - GCC cross compiler for ARM Cortex-R/M processors gcc-arm-none-eabi-source - GCC cross c...
by dhylands
Thu Dec 09, 2021 9:05 pm
Forum: Development of MicroPython
Topic: accessing list dictionary from C
Replies: 3
Views: 20356

Re: accessing list dictionary from C

They're described by this structure: https://github.com/micropython/micropython/blob/c613f5bb49bd83137c11912260c7691f4b284a90/py/objlist.h#L31-L36 So basically a pointer to a contiguous array of mp_obj_t's, one for each element in the list. You can look at objlist.c for some functions which utilize ...