fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

8.8K
active users

#micropython

6 posts6 participants1 post today

For those not following #m68kMicroPython development, a lot has been happening rather quickly in the last couple of weeks!

There's enough support for the Toolbox now that I've been able to re-create the #Macstodon splash/loading screen with it - see below.

Big thanks to @stylus for all his hard work developing the port and making this possible!

#RetroComputing #RetroProgramming #VintageMac #Apple #Mac #MacOS #ClassicMac #68k #Python #MicroPython oldbytes.space/@smallsco/11488

#m68kMicroPython happenings: The "struct-types" branch is coming along. There are now autogenerated bindings for the following parts of the API: modmactypes.c
modqd.c
modtoolboxevent.c
modtoolboxutil.c
modwindowmgr.c

there's probably broken stuff but for instance you can now splat directly onto the screen

>>> scrn = qd.qdGlobals().screenBits
>>> n = scrn.bounds.bottom * scrn.rowBytes
>>> for i in range(n): scrn.baseAddr[i] = i

and types are checked:

>>> qd.FillRect(7, "blue")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: Expected int, got Rect

um well except the error message is backwards 💦

and in upstream #micropython land my exploration found that there were problems with the uctypes module and "REPR_B", so I'm working on fixing that and ensuring it stays fixed via the CI system: github.com/micropython/micropy

right at the moment, the micropython PR is failing for some reason that will probably be more obvious to me once I've had another night to recover from jet lag.

Summary
For m68k-micropython I&#39;m interested in REPR_B. However, CI doesn&#39;t check any REPR_B builds, so of course there were test failures.
This patch series adds a 32-bit REPR_B build (i686...
GitHubTest REPR_B & fix test failures by jepler · Pull Request #17688 · micropython/micropythonBy jepler

🦾 Why Lua Beats MicroPython for Serious Embedded Devs

「 Lua isn’t just compatible with embedded systems; the Lua ANSI C library was designed for them. Its architecture is clean, compact, and deterministic.

MicroPython, on the other hand, is a reimplementation of Python 3. It works well for many embedded use cases, but it inherits assumptions from a desktop-oriented language 」

embedded.com/why-lua-beats-mic

Embedded · Why Lua Beats MicroPython for Serious Embedded Devs - EmbeddedIn professional embedded projects, ranging from industrial automation to medical devices and commercial IoT products, developers increasingly favor

I just published a server and client for accessing a remote filesystem on a micropython device by mqtt.

See:

github.com/dov/upython-mqtt-fi

Meanwhile I have used it for uploading photos to my device.

This library solves the "grandma problem" of how to place a photo frame on grandma's mantle piece and push images to it without her interaction.

GitHubGitHub - dov/upython-mqtt-file-server: I micropython file server controlled over mqttI micropython file server controlled over mqtt. Contribute to dov/upython-mqtt-file-server development by creating an account on GitHub.

I'm getting closer to the enhanced version of the API wrapping tool I've been working on.

Now, even recursive structures like Region (which contains a Rect structure inside it) seem to have their type objects emitted correctly; I need to do more checking of the generated structure descriptions, though, especially as far as data alignment is concerned.

The main item left is to correctly return ctypes structures and to verify the types of structures passed in.

Once this gets to a good spot, I'll separate the uctypes enhancements (named structure types) and see whether upstream is interested in them.

WIP code is up at github.com/m68k-micropython/mi

Summary
This is an experiment. I want the usual Python guarantee that you can&#39;t just footgun yourself by passing the wrong thing through a pointer argument, at least as much as is practical.
Bu...
GitHubmoductypes: Add types by jepler · Pull Request #11 · m68k-micropython/micropythonBy jepler

I am a sucker for opto-electronics, so got this discarded kit (ex CNN's London studio?)

Each button has a 36x24 LCD display and red+green LEDS.

Well-designed hardware: ColdFire (=68k) CPU, plenty of RAM, plenty of FLASH, serial port, ethernet etc.

Firmware ? Not so impressive, but very easy to get rid of:

Anybody can flash new firmware from ethernet: No userid, no password, all you need to know is the IP# and how they botched their CRC-16 implementation.

Now it runs :-)

Looking for a QMI8658 IMU library for MicroPython. The one used in the Wemos S3 Mini Pro has the following methods: invSqrt, test, read_temp, read_accel, read_gyro and get_euler_angles — but the actual source code doesn't seem to exist anywhere

Temperature and humidity sensor development continues on the software front. Sleeping the hardware for 4secs between reads yields ~34.5 hour life with a 1100mAh battery. Going to try caching data on the device and connecting/sending across the network less often next.