execute regular Python script using MicroPython

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
ofirgaash
Posts: 1
Joined: Sun Jul 24, 2022 10:42 am

execute regular Python script using MicroPython

Post by ofirgaash » Sun Jul 24, 2022 10:49 am

Hi everyone, I'm new to programming so maybe it's a dumb question so forgive me.

I'm trying to understand how to execute a *python* code using Thonny and raspberry pi pico.
I mean, I'm running a MicroPython code, and I want to give it an 'if statement' something like this:

# do a bunch of stuff
# if something is true: execute a python code
# continue doing stuff



Thanks in advance for any help!!

User avatar
karfas
Posts: 193
Joined: Sat Jan 16, 2021 12:53 pm
Location: Vienna, Austria

Re: execute regular Python script using MicroPython

Post by karfas » Sun Jul 24, 2022 4:59 pm

What exactly is your problem
a) How to use thonny ?
or
b) How to write an if statement ?

Regarding b): There are great resources about python programming all over the net. Use them.
A few hours of debugging might save you from minutes of reading the documentation! :D
My repositories: https://github.com/karfas

Post Reply