Quantcast
Channel: Raspberry Pi Forums
Browsing all 1225 articles
Browse latest View live

Python • Re: Output to .csv file in Chinese? Characters

How are you writing the file? It sounds like you may be writing binary data to the file, instead of text. Have you tried looking at it in a terminal window, e.g. "less myfilename.csv"?If possible,...

View Article


Image may be NSFW.
Clik here to view.

Python • Re: PID controller help

Im still not having any luck with this. Any pid example I’ve found either isn’t set up to work with a pwm output or I can’t get it to work with the rest of my code for the rtd input/pwm output From...

View Article


Python • Python Script does not run with address 0x4a or 0x4b but does with...

Hi all,from a Pi4/64 with bookworm connected to a board with 4 ADS1115 on I2C bus, all are found running the I2C watch, the Python script in a venv fails to run if address 0x4a or 0x4b is called.``` 0...

View Article

Python • basic Oauth2 for my app... redirect_uri?

Hi.Im trying to get working the more basic and "direct" code for Oauth2 in lichess.orgI read the documentation of the lichess API and also the documentation for the python module...

View Article

Python • Re: basic Oauth2 for my app... redirect_uri?

The redirect_uri should be sent by the server with a 3xx code after you send the user/password.Just a guess.Edit: The returns from the email server are divided into groups2xx = OK3xx = requires...

View Article


Python • Re: Python Script does not run with address 0x4a or 0x4b but does...

hi all,just for update.after two days power down and restart script worked again in pythons venv and local mode.one minor typo in ads-adc definition though - easy fix.cwStatistics: Posted by wwt — Wed...

View Article

Python • Re: Send email from python

Did you try following the steps in the article?not yet, as I was looking for something more simple, I don't know if I am going to get thatmaybe I will try in, when I feel like doing it, there is a lot...

View Article

Python • Running of program gets stuck on tensorflow code

HeyI'm taking an old project of mine and adding some "Tensorflow magic" to it. Basically I have this car that I control with a pi, and it has attributes like sensors, cameras and servos. I want to add...

View Article


Python • Re: making a subscriber for raaspberry pi (lagging)

The issue I have is you didn't use code tags. The indents aren't showing. Makes the code impossible to read.What device is ttyACM0? I use Arduino boards that show up as that.Statistics: Posted by...

View Article


Python • Re: Mahine vision architecturte for high FPS (>15) with...

It sees squirrels as cats or bears !! Presumably the model knows nothing about red squirrels....ultralytics/cfg/datasets/coco.yaml# Classesnames: 0: person 1: bicycle 2: car 3: motorcycle 4: airplane...

View Article

Python • Re: gpiozero servomotor issues

I guess to close it out this worked perfectly, thank you you are a life saver!Statistics: Posted by Operantboxhelp — Wed Oct 23, 2024 2:06 am

View Article

Python • serial.Serial no longer works correct

Hello, the expression serial.Serial no longer works for me.import serialimport timeser = serial.Serial('/dev/ttyUSB0',9600)A = "255\r"ser.write(bytes(A, 'utf-8'))print ("ALL RELAIS:...

View Article

Python • Re: serial.Serial no longer works correct

Which version of Raspberry Pi OS are you running (e.g. Bookworm 64-bit) and are you using a python virtual environment (venv)?What does pip list show e.g. my Pi4 Bookworm (not in venv) has: Code: pip...

View Article


Image may be NSFW.
Clik here to view.

Python • Ultrasonic Sensor USB Serial Python

Hello all I am new to the Raspberry Pi forum I'm not too sure where this topic might belong since it encompasses a lot of different stuff but I have decided to try my luck here. I have an Ultrasonic...

View Article

Python • Re: Ultrasonic Sensor USB Serial Python

Python code relies on indentation (left-hand white space) for its syntax. The forum software provides [_Code_ ] tag markup to preserve indentation. This is found on the fifth 'button' from the left at...

View Article


Python • MemoryError: memory allocation failed, allocating 21858 bytes

I have a setup with a raspberry pi pico I have 3000 lines of codewhen I compile I get this error:MemoryError: memory allocation failed, allocating 21858 bytesorRuntimeError: bytecode overflowwith the...

View Article

Python • Re: MemoryError: memory allocation failed, allocating 21858 bytes

I have a setup with a raspberry pi pico I have 3000 lines of codewhen I compile I get this error:MemoryError: memory allocation failed, allocating 21858 bytesorRuntimeError: bytecode overflow'...How...

View Article


Image may be NSFW.
Clik here to view.

Python • Easy button

Sorry for the newb question. I thought this would be easy but turning out to fight me. When I leave the batteries in it returns all 1s without pushing and when I take out AA batteries it returns 0s....

View Article

Python • Re: Easy button

Check your wiring to the pins - see https://pinout.xyz/#Are you running Bookworm or other version of Raspberry Pi OS?Which Pi is it?Where are these AA batteries?Looks like there are crocodile clips...

View Article

Python • Detect motion with pi camera v1

So I have found this python script and it detects motion.The problem - it uses raspistill and I don’t know how to make it work with picamera 2https://thezanshow.com/electronics-tuto ......

View Article
Browsing all 1225 articles
Browse latest View live