Python for Uno Q

Well I have watched videos and tried to learn as much as possible about the UnoQ which mine is scheduled to arrive tomorrow. The funny thing is I've watched a lot of videos people being frustrated trying to get it to work.
So from my knowledge to get the most of the board I need to learn python and use a bridge to connect to the STM32 (with C++) when needing to turn devices off and on and do microcontroller tasks. Or use the App lab. Or use the Zephyr to directly use the Arduino IDE to control the STM32 (seems like a waste why not just use an R3 or R4 in that case?)
The Qualcomm will be running Linux using python to do big tasks like running a GUI. So it seems python is key to using the board to its potential.
Someone correct me if I'm mistaken here.

Long story short any recommendations on learning python? I'm fairly decent at teaching myself I just need some pointers (no pun intended) at some resources. Books etc. It seems python is actually easier to learn at first glance although white spaces look confusing.
Any advice is greatly appreciated :nerd_face:

Hi @r_hatton.

If you are only ever using the STM32 microcontroller on the UNO Q board, that would indeed indicate that you have not selected appropriate applications for the board.

However, there are completely valid use cases for uploading sketches to the STM32 microcontroller on the UNO Q using Arduino IDE. The sketch program you upload via Arduino IDE can communicate with the Linux machine on the UNO Q. So just because you are using Arduino IDE doesn't mean you can't also utilize the capabilities of the Linux machine in your projects.

Arduino IDE is a tool dedicated to developing Arduino sketches. So it is a logical choice for anyone who wants a highly capable tool for developing sketches to run on the UNO Q's STM32 microcontroller. You would then use a separate appropriate tool of your choice to develop the components of the project that run on the Linux machine. There are many high quality free open source tools for any type of development of programs that run on a Linux machine you could possibly want.

This modular approach to development gives you more freedom and flexibility to choose the tools that meet your individual needs and preferences. However, with that freedom and flexibility comes significantly more complexity. This is why Arduino created Arduino App Lab. This provides everything you need to create projects that utilize both the microcontroller and Linux machine on the UNO Q in a single tool.

Arduino chose Python as the method of programming the Linux machine when using Arduino App Lab. Python is a popular language for which you will find a tremendous quantity of resources. So this is certainly a good choice.

However, there is nothing about the UNO Q that limits you to using Python. You are free to choose any language, framework, and tools you like to utilize the Linux machine.

Arduino provides a "golden path" with Arduino App Lab (similar to what we do for traditional microcontroller development boards with Arduino IDE and Arduino Cloud Editor). If you want a gentle learning curve and easy access to the software assets created by Arduino, Arduino App Lab is a good choice. However, it is important to understand that it is only one of many options available to you.

Everyone has a different learning style, but for me the best way is to just start using it. Start with very simple "Hello, world!" type of programs. Once you are able to make a basic script run as expected, start working on learning and verifying your knowledge of each of the individual components you will need for your real project. When you find that there is some specific knowledge you are missing, a good place to start your research is the official Python website:

They do provide a tutorial that might serve as a useful introduction to the language if that is your learning style:

If you don't find what you are looking for in the official documentation, just hit up a search engine and you'll be sure to find plenty of information.

Note that the Python documentation only provides documentation of the language. You won't find any information about the arduino Python package created by Arduino for use in Arduino App Lab "Apps". For information about that, you should instead consult the documentation provided by Arduino:

https://docs.arduino.cc/software/app-lab/

https://docs.arduino.cc/tutorials/uno-q/user-manual/


One thing you might consider is getting started by running Python scripts on your PC. It is quite easy to install Python on your PC (and you might even have it installed already). You won't be able to use UNO Q-specific code in the scripts you run on your PC, but quite a lot of the Python script code you will be writing for the UNO Q projects is not in any way specific to the UNO Q hardware. So the knowledge you gain from experimenting with Python scripts on your PC will definitely be applicable to the UNO Q.

The reason this is worth considering is that an Arduino App Lab App is a Python script running in a Docker container. It takes some time to start up the container before the Python script can start running. That delay on startup is not very significant when you are working on a complex App where you will typically be spending a lot of time working on the code between each time you start the App. Additionally, having your Python script run in the controlled isolated environment of the container is very beneficial for reliability of a finished project. However, in the case where you are performing many simple "Hello world!" type experiments in rapid succession solely in order to learn the basics of the Python language, those delays for starting the App can be more significant.

The best thing is you can get started with using Python right now instead of having to wait until tomorrow :smiley:.

These two threads: (thread-1 and thread-2) might help you in case you face problem with the booting/running of your to be arrived UNO Q.

Arduino App Lab is an excellent IDE to learn Python Language for writing, uploading, and testing scripts for Linux MPU of the UNO Q board.

I agree! Another tool that works fairy well is Microsoft Visual Studio Code. I'm learning neural networks writing Python stuff with VS Code on my computer (not on Uno Q). AI helps a lot by predicting what I want to write. But I have to read through every suggestion it writes to actually learn something, or else I will never learn. Then, writing Python in App Lab gets easier all the time. I can always ask Copilot to check my code, or explain line by line some code I borrough from elsewhere. I feel I actually learn all the time. Until now I've felt a reluctance to learn Python. But I've learnt not to compare it to C/C++, which is and will always be a superior language.

App Lab comes with several script examples that are good sources for learning Python language constructs. My approach is to first run an app, observe its output, and then take individual lines from the script and ask Gemini or ChatGPT about their meaning. Both explain the code quite well. This is how I have been learning Python programming.

Until I got the UNO Q in January 2026, I had virtually no knowledge of Python. I find it to be a very enjoyable language to learn and use. The only aspect that annoys me is its indentation-based syntax. It would be helpful if the Arduino tools provided an "Auto Format" feature for Python, similar to the one available for Arduino sketches under IDE.