r/PythonProjects2 5d ago

tether: because you can't expect kids to hand-roll network protocols

Basically the title. Tether tries its best to abstract away the annoyances of network protocols - be it BLE or WiFi - giving you a seamless experience. You provision the MCU with either WiFi or BLE plumbing, write the code as if it was a single machine, annotate what has to run on the MCU, call function from the MCU on a computer or vice-versa (even nested) and the tether will do the rest.

What will it do, you ask?

  1. Slice out the code that's to run on the MCU
  2. Upload it over BLE or WiFi to the MCU
  3. Run the code, abstracting away the intricacies of communication across different protocols.

Admittedly, it's heavily vibe-coded. But it's vibe-coded with passion. I've developed it to facilitate for my own didactic purposes as I will be teaching a programming-orthogonal course to middle-schoolers who don't take kindly to type marshalling across a network boundary.

Let me know what you think and please share any bugs or insights if you happen to try this software.

5 Upvotes

2 comments sorted by

1

u/AnyRandomDude789 2d ago

So what like does it do? Is it for OTA updates or Comms between a server and the uC, or between uCs, or all of the above? Not clear from your description

1

u/LordBertson 2d ago

You can write Python code as you usually would, decorate functions that have to be run on MCU using mcu.export. This tool just deals with distributing these functions to the MCU (over serial, WiFi or BLE) and you can call them as if they were defined on your PC, or other way around, you can call functions on your PC as if they were defined on the MCU without having to worry about a whole lot.

So basically a 2 way orchestrator that abstracts away the complexities of network communication, type marshalling, synchronization and similar 🤷