Hot answers tagged

4

I would recommend a transistor - not only does it reduce the current required but it isolates the Pi from the relay which helps to ensure that the Pi is less likely to suffer damage. Is this just a relay that you plan to drive directly? Don't forget about the reverse EMF that occurs when the relay is de-energised - it will generate a high enough voltage to ...


3

No - there is no way to do this on an RPi without additional hardware. Neither the question, not the referenced documentation provide the magnitude of this sine wave. Without that information the additional hardware required can not be determined. EDIT: The OP has found some specifications on the amplitude of the sine wave output from the ac generator in the ...


2

Your circuit is missing a ground connection from the Pi. You need a common reference so that the circuit can tell the difference between GPIO high and GPIO low. Connect a Pi ground pin to the circuit ground (e.g. the -ve of the battery).


2

The github resource you have found has a line where your connection is defined. Check this one: Display = tm1637.TM1637(CLK=21, DIO=20, brightness=1.0) Now, let's check the connection - picture: Please note the code saying CLK=21 and DIO=20 and two wires connected there. If you want to use other pins, for example GPIO2 and GPIO3 change them in the ...


1

The Answer to the Question you actually asked is quite simple. dhcpcd is a generic service which is applicable to ANY Linux distribution. It is NOT specific to the Pi, has no knowledge of the Pi hardware, and thus has NO code which could interrogate the Pi hardware. It would be possible to write some code to re-configure dhcpcd when a GPIO pin changes state, ...


1

You could create a simple python script that runs on startup with Cron. That script would display whatever you want for a small amount of time and then end. This would effectively tell you when your Pi's done with booting or if it still is. You can enter this to edit crontab: crontab -e. Select Nano or any editor you're comfortable with and add a line like ...


1

I believe the problem is really in the old OS (or probably rather: Old libs) in use. The Pi4 requires an update to the I/O library for the input pull-up resistor setting to work properly, which is likely used by the above Button class. Try a never version of Rpi.Gpio, when possible. Alternatively, you could add an external pull-up resistor to your button pin ...


1

I'd add a comment but I don't have enough rep yet - We need to see the schematic of the remote you're trying to connect it to before we can answer. Edit: Scratch that I think I see the issue: Your circuit does not match your circuit diagram. You've got pins 1 and 3 mixed up on your transistor. You also do not seem to have connected the Pi and remote to a ...


1

What you need to do is wire the transistor correctly! Connect the load in the collector circuit as suggested https://elinux.org/RPi_GPIO_Interface_Circuits What you have will put ~2.7V across the load - the remaining voltage will be across the transistor and be dissipated as heat! NOTE the S9013 is an NPN transistor - your schematic shows PNP.


Only top voted, non community-wiki answers of a minimum length are eligible