Questions tagged [thonny]

Thonny is a beginner-friendly Python IDE; hence there may be questions here tagged with [thonny] that really have nothing to do with the IDE itself but are a proxy tag for something like [python-beginner]. The [thonny] tag should be used for IDE-related issues, which probably don't belong here.

Thonny is a beginner-friendly Python IDE; hence there may be questions here tagged with [thonny] that really have nothing to do with the IDE itself but are a proxy tag for something like [python-beginner]. The [thonny] tag should be used for IDE-related issues, which probably don't belong here.

158 questions
1
vote
1 answer

Can't figure out how to get my mouse cursor on the center of the rect

When i hit play my cursor seems to be on the top left corner of the rect, i am very fresh to using thonny/pygames and can't figure out how to get my mouse cursor to be in the center of the rect. Any help would be greatly appreciated, thanks!…
FreshApple
  • 49
  • 3
1
vote
2 answers

I cannot import a module to Python 3.7 since it is directed to python2.7

I'm new to coding. I was given a raspberry pi 4 for Christmas and I am trying to use it to make an automated sprinkler system. My problem is that I am unable to send the data from the capacitive soil sensor through my ESP32 to the Pi. I have looked…
1
vote
0 answers

thonny plugins need to be restarted?

I tried to use the pyaudio plugin and after installing it, this showed up. I have tried shutting down my computer and closing down thonny.
1
vote
1 answer

Given a midpoint, gradient and length. How do I plot a line segment of specific length?

I am trying to plot the endpoints of the line segment which is a tangent to a circle in Python. I know the circle has center of (A, B), and a radius of r. The point at which I want to find the tangent at is (a, b). I want the tangent to be a segment…
Kerushi
  • 11
  • 2
0
votes
1 answer

Python Error checking using pymysql get errors

I have put together an example python scripts for myself to understand how to connect to a MySQL database using pymysql. It works but in Thonny-Assistant it is showing a few errors and I am asking for help to understand these errors to see if they…
0
votes
0 answers

Raspberry Pi script with timeout and record does not work if started from autostart

I'm quite new to coding and cobbled together some code to automatically run our python cameras for animal surveillance. I have a working code that runs well from autostart (located on the desktop for easy editing). Just some recording after a short…
0
votes
0 answers

"OSError: [Errno 5] EIO" when running my code

Error: >>> %Run -c $EDITOR_CONTENT Traceback (most recent call last): File "", line 5, in File "/lib/ssd1306.py", line 110, in __init__ File "/lib/ssd1306.py", line 36, in __init__ File "/lib/ssd1306.py", line 71, in…
Pinnache
  • 1
  • 1
0
votes
1 answer

No module named 'Adafruit_DHT' Raspberry pi 4 model B 32-bit OS

I'm having a Raspberry Pi 4 model B with 32-biy OS I have tried to use this command to install 'Adafruit_DHT' on my Raspberry pi 4 model B : git clone https://github.com/adafruit/Adafruit_Python_DHT.git cd Adafruit_Python_DHT sudo apt-get…
0
votes
0 answers

Raspberry Pi 4 Thonny Opencv

I cannot run my code that I wrote on python IDE 3.11 to the python Thoonny 3.9. I downloaded the opency libraty:https://qengineering.eu/install-opencv-on-raspberry-pi.html. I also used picamera2 library but fail. How should I integrate my code to…
0
votes
2 answers

_tkinter.TclError: invalid command name ".!canvas" PROBLEM

I cant create any shape with tkinter. Problem is only in this code, any other works fine. import tkinter okno = tkinter.Tk() okno.geometry("1280x720") platno = tkinter.Canvas(width = 1280, height = 720) platno.pack() okno.resizable(False,…
Moti
  • 1
0
votes
0 answers

Thonny IDE, micropython I2c memory operations- readfrom_mem, writeto_mem- returning 0x00 from NAK registers

I am trying to design a code where I can determine which registers exist since they can generally be anywhere from 0x00 to 0xFF. Currently using i2c module defined in micropython and also using pico interpreter for the software in Thonny. I just…
0
votes
1 answer

Unable to display sensor reading from Respberry pi pico to android serial terminal through RC-06

Code: from machine import Pin, UART uart = UART(0,9600) while True: if uart.any(): uart.write('t') command = uart.readline() print(command) # uncomment this line to see the recieved data Connected RC-06 to respberry pi pico…
0
votes
1 answer

Can't connect to mqtt broker, not getting CONNACK

I am trying to connect my raspberry pi Pico W to a virtual machine which has a mqtt broker in it and a node red server. My MQTT broker is password protected. I have added the MQTT broker IP in the MQTT node on node red and the connection runs fine…
0
votes
0 answers

Trouble With Multithreading in RPi Pico (Need to toggle an LED on one thread and run a rotary menu connected to LCD on other thread)

import machine import utime import _thread from rotary_encoder_classes import * clock_pin = machine.Pin(25, machine.Pin.OUT) frequency = 1 def clock(frequency): while True: clock_pin.value(1) #Set led turn on …
0
votes
1 answer

How do I open a file in a Python program if the error I'm getting says the file doesn't exist? It exists in my fileexplorer

How do I open a file in a Python program if the error I'm getting says the file doesn't exist? It exists in my fileexplorer. Error message: Traceback (most recent call last): File "", line 1, in FileNotFoundError: [Errno 2] No…
Kay
  • 1
  • 1
1 2
3
10 11