trying to let my 1x8 and 4x8 segement turn fully on

December 20, 2023, 18:42

timothemagi

the segements both have some parts on but not all

null

Here, by the way, because of the display, apparently you can't control it properly without the circuit board. https://raspberrypi.stackexchange.com/questions/28934/how-to-connect-7-segment-4-digits-display-with-pi

timothemagi

but shouldn t all lights turn on atleast

timothemagi

cuz now 2 do on the 4x8 but not very bright

null

I don't know about this but this was mentioned and also marked solution: " There is no simple solution to a raw display like you linked. That requires multiplexing, which requires constant processing to to maintain the display. Maybe with a threaded library you could something acceptable, but I don't know if such a thing exists. As an alternative, you could use the Adafruit LCD display with I2C interface. Adafruit has a tutorial for using it with the Raspberry Pi and has a Python library on github that seems to be what you want. There is even sample code."

timothemagi

but shouldn t the hardware just work without it?

timothemagi


timothemagi

Just want this on the 1x8 and 4x8

null

I have no idea but the text from the link, if you would read it, tells me that things are going very badly. And as I already mentioned, I don't really have a clue, but I am of the opinion that it doesn't work or only works very badly without the circuit board.

timothemagi

yeah but you need code to show a diff number i get that on 4x8 but it needs to shine in the first place and it doesn t

oops.se

Can you get the display working without Raspberry Pi. Connect a-g to + via resistors (value?) and d1 to GND or vice versa depending on what display you have (common andode or cathode).

oops.se

And start by adding info about your circuit, schema, URL your following, components your using.

timothemagi


timothemagi

Got this now

timothemagi

im using a rotary a 1x8 and a4x8 and wanna add buzzer led and button latrer

timothemagi

Got this now the rest of the pins are directed to the 1x8 on the same line as the other a etc

timothemagi

Can also try kicad but doesn t seem user friendly 😅

oops.se

If you first read and then answer perhaps something meaningfull appears!

timothemagi

idc anymore hopeless anyway

null

No, you just have to read properly and answer the questions completely and not just halfway. In the Python Discord too, someone asks you about the products you use so that they can help better, but you don't answer.

oops.se

And remember all people that try to help you do it voluntarily, no one is forces, paid or coerced in other ways to help you.

timothemagi

it is been here for 4 days now

oops.se

Please post info that can be used to help you!

oops.se

All other stuff you post isn't helping you!

timothemagi

no peogression anyways

oops.se

So you are telling me you don't need any help?

timothemagi

just saying i have asked a lot of help but little to no progress in 4 days

oops.se

And now I try to help you and ....?

timothemagi

py
from RPi import GPIO
from time import sleep

clk = 16
dt = 20

GPIO.setmode(GPIO.BCM)
GPIO.setup(clk, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.setup(dt, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)

counter = 0
clkLastState = GPIO.input(clk)

try:

        while True:
                clkState = GPIO.input(clk)
                dtState = GPIO.input(dt)
                if clkState != clkLastState:
                        if dtState != clkState:
                                counter += 1
                        else:
                                counter -= 1
                        print (counter)
                clkLastState = clkState
                sleep(0.01)
finally:
        GPIO.cleanup()

timothemagi

this is the code rotary

timothemagi

py
#importeer GPIO en time package
import RPi.GPIO as GPIO
import time

#gebruik BCM mode voor de pin nummering (conform breakout)
GPIO.setmode(GPIO.BCM)

#zet de pin als input
GPIO.setup(4, GPIO.IN)

# loop through 20 times
for i in range(20):
 print(GPIO.input(4))
 time.sleep(1)
GPIO.cleanup()

timothemagi

and this of the button

oops.se

And the you have figured out issue with the LEDs?

timothemagi

no started off from scratch

timothemagi


timothemagi

Sp have this now

timothemagi

Wanna make a game where you scroll the number with scrollthing it will beep when you get close and harder when ur on it you press the scrollthing and it will add to the number when you get 1 it will add to the 4 numbers so you guessed 18 18.. 1815 and if all are guessed led will glow and will show a code on it after x amount of time.sleep() How should i place it on my gpio for a logicol structure also needs to start without screen so with a button

oops.se

A recommendation, ask one question and when that is completed take the next question.

oops.se

And when you get into trouble use the KISS principle https://en.wikipedia.org/wiki/KISS_principle

oops.se

As you have done now, get the rotary coder to work first

timothemagi

so it needs to switchg lef and right need to set cap wich should be pretty easy and something with a press like in my other code

oops.se

Yes, but add print statement so you can verify the code

oops.se

As you have done in the button code

timothemagi

i print the counter

timothemagi

?

oops.se

And when you post pictures, crop away unnecessary stuff! Post like this

oops.se

Ooops I cropped away the button

timothemagi

alr

oops.se

The rotary code is exactly as a example I have used before from PiHut

oops.se

And to verify it there is a print counter as you said.

oops.se

Have you check that code?

timothemagi

yeah

oops.se

And ?

oops.se

the result?

timothemagi

-1 0 to infinite but alr knew that

oops.se

But I didn't

oops.se

And what is "arl" ?

oops.se

And now I start to wonder, why do I use a lot of time to help you? Please have a rethink! And Im off to bed.