Hi everyone just unpacked my anticipated Uno Q Christmas gift, successfully went through some issue at getting it properly work, ran through basic examples like “Blink LED”.
It’s the first time I’m facing a two processor (MCU - sketch to MPU - python) way of programming and I realized (not a very thoughtful consideration, indeed
) that properly managing the Bridge Tools is key for every kind of future steps.
I read the official documentation and I’m right now in the “trial & error” phase, which is fun as in every new adventure, but I’m very lacking some simple examples end to end on how to do very simple things.
For instance how to let “Arduino” communicate the number 1 to “Pyhton” and let Python write it.
Here below the two code snippets. Surely I’m missing something “silly and basic”, sorry, but this is the reason why I’m eager to some practical examples on the “Bridge Tool “ mechanics:
Python side snippet:
from arduino.app_utils import * #comando di import di tutte le librerie utili per arduino
print("ciao brutti")
def pippottella(data: int):
print(data)
Bridge.provide("python_function", pippottella)
pippottella
App.run()
Arduino side snippet:
#include "Arduino_RouterBridge.h"
void setup() {
Bridge.begin();
int data = 1;
Bridge.notify("python_function", data);
}
void loop() {}
message in Python Console
======== App is starting ============================
2025-10-25 07:05:07.119 INFO - [MainThread] App: App started
Activating python virtual environment
ciao brutti
======== App is starting ============================
2025-10-25 07:07:10.948 INFO - [MainThread] App: App started
What I would expected is that in Python Console after the message “ciao brutti” I found “1” provided by the execution of pippottella.
Sorry for the silly question and thanks in advance for every guidance and working samples of the same very simple use case.
Andrea
