Nr2pico u2if - Python to JS - help WANTED

I believe there would be a need for a direct Raspberry Pi Pico USB <-> NoreRed interface:

  • nr2pico
  • nr2u2if
  • nr2rp2040
0 voters

Previously I've listed the possibilities here ... and I think the best approach would be: u2if firmware working together directly with NoreRed.

But I need help to translate this python code to JavaScript (Nore-Red):

(I know there is pythonshell available, but that would not be the same fast and would complicate install for end-users.)

Benefits (over NR-Arduino Firmata node):

  • More stable C++ firmware based on official pico-sdk, handling reconnect
  • Much higher transfer rate (min. 1Mbit)
  • only necessary transfers = less CPU usage (not continuous 57K)
  • Not just PWM + Digital-IO, but other functions would work too:
    (ADC, Temperature, I2S, SPI, HUB75, ...)

Also other, compatible RP2040 based boards would work too:

  • PICO
  • QTPY
  • QT2040_TRINKEY

Why USB?

  • Can be directly plugged in, no need to pre-configure SSID etc.
  • The board is cheaper without Wifi / BT
  • Connection is more stable than wireless
  • USB cables are shielded by default, and can reach 4.5m (+ more with extenders),
    so industrial applications are possible too!
  • can multiply ports with cheap USB hubs.

(Tried to do it myself using ChatGPT, without success.)

There's no need for an "interface".
You may execute Node-RED flows on a Pico with node-red-mcu & the node-red-mcu-plugin. It's a different concept to what you are looking for - but offers endless options to access the Pico hardware.
Additionally you may look at the (pure) Moddable SDK - which is the foundation node-red-mcu is based on.

Thanks for the hint! Yes, I know about that module. My detailed answer is here ... so we do not spam this topic.
My conclusion is: it is not possible to do this with it. If I may be mistaken, please post a working flow to prove otherwise to the other topic! It would make me really happy.