E
E
Eugene2020-06-21 01:52:03
Python
Eugene, 2020-06-21 01:52:03

How to set up coolers and power button in Raspberry Pi?

Hello! I, being a HUMANITARIAN , decided to buy a raspberry 3B as a multimedia player and game emulator. Self-isolation, after all, here is a new entertainment. But I ran into the following problems:

1) I bought a radiator with two coolers for the raspberry. But in the off state, they continue to work, which confuses me a little. Tell me, how can I make them stop working after turning off the raspberry?

2) I also found out that the raspberry (personally, as for me) has some kind of strange situation with turning it on and off. Based on the post in habré - https://habr.com/en/post/254723/I soldered the button and connected it to pins 5 and 9 (instead of the suggested 5 and 6 (GPIO3 and ground) since this ground is occupied by the cooler). And so, as soon as it came to the code, I got stuck. I decided to follow the Python path, and installed a fresh RPi.GPIO via the command line.

I found advice in the comment https://habr.com/ru/post/254723/#comment_11312250 , but I don’t understand how to correctly and where to insert the code ... Plus, I didn’t understand how to add the script to autoload through the proposed cron (and not at all understood what cron is and where it is!). Deciding to take a chance, I went into python using some guide (via the command line), and entered the code that was suggested in the comment. But nothing happened.
In general, leaving this matter, I turned off the raspberry and went to lunch. When I came back, I began to think about how to turn it on without reconnecting to the outlet. I pressed a homemade connected button, and it surprisingly turned on! Although I don't understand how it happened.

3) I read more than once that unplugging from the outlet is harmful for raspberries. They say you need to turn it on somehow correctly. Memory cards die due to "wrong" inclusions and disconnections. Explain how to turn it on and off? Wouldn't it be "harmful" if I turn off the raspberry through the "start" menu (or whatever it is called there), and pull out the power cord if necessary.

I repeat, I am very far from writing codes, so I do not understand how and what to do. So I ask you to understand, forgive, and explain like a 5 year old.

Thanks

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question