Jump to content

Do you want to see the results on YT? I don’t mind making a video on it

 

EDIT: Now this thread will probably be locked for advertising

specs

Spoiler

ASRock B650I Lightning WiFi

AMD Ryzen 7 7700X

KLEVV CRAS V RGB (2x16GB) 6000MT/s out of the 7200MT/s I could be running

ASUS RTX 3060 OC (12GB)

Thermalright Frozen Edge 240 RGB

Lian Li A4-H2O

 

linux packages

Spoiler

tmux

btop

git

Link to comment
https://linustechtips.com/topic/1280488-python-help/page/2/#findComment-14297304
Share on other sites

Link to post
Share on other sites

3 minutes ago, TheCoder2019 said:

That’s literally what I’ve just read 5 mins ago. It works well, no repeated echo. I would call this thread a success. Thank you for sticking around the 1 hour and 30 some minutes you did

ok 

it would be much easier in c but happy to hear it works

if it was useful give it a like :) btw if your into linux pay a visit here

 

Link to comment
https://linustechtips.com/topic/1280488-python-help/page/2/#findComment-14297324
Share on other sites

Link to post
Share on other sites

And one more question... How do I print all the switches that are on in one line?

specs

Spoiler

ASRock B650I Lightning WiFi

AMD Ryzen 7 7700X

KLEVV CRAS V RGB (2x16GB) 6000MT/s out of the 7200MT/s I could be running

ASUS RTX 3060 OC (12GB)

Thermalright Frozen Edge 240 RGB

Lian Li A4-H2O

 

linux packages

Spoiler

tmux

btop

git

Link to comment
https://linustechtips.com/topic/1280488-python-help/page/2/#findComment-14297327
Share on other sites

Link to post
Share on other sites

Just now, TheCoder2019 said:

And one more question... How do I print all the switches that are on in one line?

there is a thing called quote button son

and can you clarify a bit

if it was useful give it a like :) btw if your into linux pay a visit here

 

Link to comment
https://linustechtips.com/topic/1280488-python-help/page/2/#findComment-14297331
Share on other sites

Link to post
Share on other sites

I want to use

print(All of the switches that are on)

Obviously All of the switches that are on is not a variable.

 

I want to print all active switches on one line instead of it being scattered in the terminal.

specs

Spoiler

ASRock B650I Lightning WiFi

AMD Ryzen 7 7700X

KLEVV CRAS V RGB (2x16GB) 6000MT/s out of the 7200MT/s I could be running

ASUS RTX 3060 OC (12GB)

Thermalright Frozen Edge 240 RGB

Lian Li A4-H2O

 

linux packages

Spoiler

tmux

btop

git

Link to comment
https://linustechtips.com/topic/1280488-python-help/page/2/#findComment-14297334
Share on other sites

Link to post
Share on other sites

Can I use something like this?

while True:
     if
     assign variable
     else assign variable
     elif
     assign variable
     else
     assign variable
     elif
     assign variable
     else assign variable
    

Basically testing the value of the switches, assigning it to a list and printing it? Would that work?

specs

Spoiler

ASRock B650I Lightning WiFi

AMD Ryzen 7 7700X

KLEVV CRAS V RGB (2x16GB) 6000MT/s out of the 7200MT/s I could be running

ASUS RTX 3060 OC (12GB)

Thermalright Frozen Edge 240 RGB

Lian Li A4-H2O

 

linux packages

Spoiler

tmux

btop

git

Link to comment
https://linustechtips.com/topic/1280488-python-help/page/2/#findComment-14297345
Share on other sites

Link to post
Share on other sites

2 minutes ago, TheCoder2019 said:

Can I use something like this?


while True:
     if
     assign variable
     else assign variable
     elif
     assign variable
     else
     assign variable
     elif
     assign variable
     else assign variable
    

Basically testing the value of the switches, assigning it to a list and printing it? Would that work?

print(value1,value2,value3) use comma to separate them

 

if it was useful give it a like :) btw if your into linux pay a visit here

 

Link to comment
https://linustechtips.com/topic/1280488-python-help/page/2/#findComment-14297355
Share on other sites

Link to post
Share on other sites

Again, me being a noob, what is the variable value1- value3 assigned to

specs

Spoiler

ASRock B650I Lightning WiFi

AMD Ryzen 7 7700X

KLEVV CRAS V RGB (2x16GB) 6000MT/s out of the 7200MT/s I could be running

ASUS RTX 3060 OC (12GB)

Thermalright Frozen Edge 240 RGB

Lian Li A4-H2O

 

linux packages

Spoiler

tmux

btop

git

Link to comment
https://linustechtips.com/topic/1280488-python-help/page/2/#findComment-14297359
Share on other sites

Link to post
Share on other sites

 

1 minute ago, mahyar said:

whatever it is that you want to print 

should write this for you?

Probably

specs

Spoiler

ASRock B650I Lightning WiFi

AMD Ryzen 7 7700X

KLEVV CRAS V RGB (2x16GB) 6000MT/s out of the 7200MT/s I could be running

ASUS RTX 3060 OC (12GB)

Thermalright Frozen Edge 240 RGB

Lian Li A4-H2O

 

linux packages

Spoiler

tmux

btop

git

Link to comment
https://linustechtips.com/topic/1280488-python-help/page/2/#findComment-14297365
Share on other sites

Link to post
Share on other sites

I feel stupid having someone write the code for me lol

specs

Spoiler

ASRock B650I Lightning WiFi

AMD Ryzen 7 7700X

KLEVV CRAS V RGB (2x16GB) 6000MT/s out of the 7200MT/s I could be running

ASUS RTX 3060 OC (12GB)

Thermalright Frozen Edge 240 RGB

Lian Li A4-H2O

 

linux packages

Spoiler

tmux

btop

git

Link to comment
https://linustechtips.com/topic/1280488-python-help/page/2/#findComment-14297373
Share on other sites

Link to post
Share on other sites

Just now, mahyar said:

print(GPIO.input(switch1),GPIO.input(switch2),GPIO.input(switch3))

just copy and paste this after last elif statement

OK thanks! I am truly sorry for torturing you...

specs

Spoiler

ASRock B650I Lightning WiFi

AMD Ryzen 7 7700X

KLEVV CRAS V RGB (2x16GB) 6000MT/s out of the 7200MT/s I could be running

ASUS RTX 3060 OC (12GB)

Thermalright Frozen Edge 240 RGB

Lian Li A4-H2O

 

linux packages

Spoiler

tmux

btop

git

Link to comment
https://linustechtips.com/topic/1280488-python-help/page/2/#findComment-14297377
Share on other sites

Link to post
Share on other sites

4 minutes ago, mahyar said:

print(GPIO.input(switch1),GPIO.input(switch2),GPIO.input(switch3))

just copy and paste this after last elif statement

I might want to add a sleep timer because my console just got flooded

specs

Spoiler

ASRock B650I Lightning WiFi

AMD Ryzen 7 7700X

KLEVV CRAS V RGB (2x16GB) 6000MT/s out of the 7200MT/s I could be running

ASUS RTX 3060 OC (12GB)

Thermalright Frozen Edge 240 RGB

Lian Li A4-H2O

 

linux packages

Spoiler

tmux

btop

git

Link to comment
https://linustechtips.com/topic/1280488-python-help/page/2/#findComment-14297388
Share on other sites

Link to post
Share on other sites

Now I think we are officially done here

specs

Spoiler

ASRock B650I Lightning WiFi

AMD Ryzen 7 7700X

KLEVV CRAS V RGB (2x16GB) 6000MT/s out of the 7200MT/s I could be running

ASUS RTX 3060 OC (12GB)

Thermalright Frozen Edge 240 RGB

Lian Li A4-H2O

 

linux packages

Spoiler

tmux

btop

git

Link to comment
https://linustechtips.com/topic/1280488-python-help/page/2/#findComment-14297394
Share on other sites

Link to post
Share on other sites

It made my console look like a binary console because it is

 

 

2E09BA31-A2F7-4EC9-AD1F-54D815D0557E.jpeg

specs

Spoiler

ASRock B650I Lightning WiFi

AMD Ryzen 7 7700X

KLEVV CRAS V RGB (2x16GB) 6000MT/s out of the 7200MT/s I could be running

ASUS RTX 3060 OC (12GB)

Thermalright Frozen Edge 240 RGB

Lian Li A4-H2O

 

linux packages

Spoiler

tmux

btop

git

Link to comment
https://linustechtips.com/topic/1280488-python-help/page/2/#findComment-14297401
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×