Search found 79 matches

by scruss
Wed Jun 16, 2021 3:31 am
Forum: Raspberry Pi microcontroller boards
Topic: How to read Map() function in micropython?
Replies: 10
Views: 667

Re: How to read Map() function in micropython?

Another slightly different approach is taken by CircuitPython's map_range() function
by scruss
Mon Jun 14, 2021 8:24 pm
Forum: Raspberry Pi microcontroller boards
Topic: RPi pico machine.SPI periodic dropout.
Replies: 17
Views: 574

Re: RPi pico machine.SPI periodic dropout.

It might also be worth dropping something on the MicroPython section of the Raspberry Pi Forums, too. Some of the RP2040 hardware engineers hang out there.
by scruss
Sat Jun 12, 2021 2:48 pm
Forum: ESP8266 boards
Topic: New to MicroPython, putty showing garbage chars
Replies: 31
Views: 657

Re: New to MicroPython, putty showing garbage chars

Is this a fresh MicroPython image? The SDK 2.x.x messages and 2016/2017 dates make me suspect it isn't. Try one of the ones from the ESP8266 download page . Depending on the module, powering from the USB port is usually fine - but may not be if you've got power-hungry devices like a string of RGB LE...
by scruss
Mon May 31, 2021 7:20 pm
Forum: Raspberry Pi microcontroller boards
Topic: How to read Map() function in micropython?
Replies: 10
Views: 667

Re: How to read Map() function in micropython?

we already did this last year: map function for floats, a modification of the old code from Processing that Wiring/Arduino inherited will do: def valmap(value, istart, istop, ostart, ostop): return ostart + (ostop - ostart) * ((value - istart) / (istop - istart)) You will NEED to verify that (loval ...
by scruss
Mon May 24, 2021 11:47 pm
Forum: General Discussion and Questions
Topic: datetime not working out of the box
Replies: 18
Views: 1417

Re: datetime not working out of the box

Wrt your point: a brief look at the issue/PR history immediately shows the state of the repository i.e. not exactly active. Enough information for people to decide what to do with it, I think. With the OP in this thread leaving PRs that'll never get looked at, and lots of people leaving issues, I'd...
by scruss
Sun May 23, 2021 8:44 pm
Forum: General Discussion and Questions
Topic: datetime not working out of the box
Replies: 18
Views: 1417

Re: datetime not working out of the box

As to why micropython-lib is not maintained anymore (the very little work that is done on it, imo does not justify calling the situation otherwise), I don't understand it myself. And in my opinion it's a serious neglect on part of the MicroPython team. It would be more helpful if the MicroPython te...
by scruss
Thu May 20, 2021 11:38 pm
Forum: Raspberry Pi microcontroller boards
Topic: How to mount pen-drive to pi pico
Replies: 2
Views: 625

Re: How to mount pen-drive to pi pico

I don't know if anyone's done any work to connect the WCH CH376 and CH378 using MicroPython. They add USB hosts to really small systems: one of them is used as a hard drive emulator for the Apple II, so if it can work with a 6502 at 1 MHz, it won't be a stretch for MicroPython
by scruss
Fri May 14, 2021 11:35 pm
Forum: Raspberry Pi microcontroller boards
Topic: List Indexing
Replies: 2
Views: 585

Re: List Indexing

What was your string, and what parameters did you give to split? MicroPython v1.15 on 2021-05-06; Raspberry Pi Pico with RP2040 Type "help()" for more information. >>> string="one two three four" >>> a=string.split() >>> len(a) 4 >>> a ['one', 'two', 'three', 'four'] >>> a[2] 'three' >>> a[3] 'four'...
by scruss
Wed May 12, 2021 2:23 pm
Forum: Other Boards
Topic: [RPI 4B 8GB] How can the I2C call readfrom_mem_into be replicated with SMBus methods in micropython?
Replies: 2
Views: 797

Re: [RPI 4B 8GB] How can the I2C call readfrom_mem_into be replicated with SMBus methods in micropython?

Why are you using MicroPython? An 8 GB quad-core Raspberry Pi 4B is perfectly capable of running Python 3. It has I²C support built into the OS.