Hot answers tagged

5

I do this all the time. Ethernet (Cat5) cable is twisted pair, which provides you with cross-talk protection. Note that the longest run I've used is about 36", so you may have to do testing to ensure you're not receiving interference at long distances if that's what you're wanting to do.


5

Lots of folks do that. You may need to add some small capacitors on long cable runs to reduce and RF interference that a long unshielded cable can pick up.


5

Graphics cards are usually connected via PCI or PCI Express bus. The Raspberry Pi has no such bus. It has a built-in graphics card, however. It's fast enough to run Quake 3 :-) Edit: Actually, there are USB graphics cards by DisplayLink, see http://plugable.com/2014/03/06/displaylink-usb-2-0-graphics-adapters-on-linux-2014-edition I don't know if anyone ...


4

By default pigpio uses the PCM peripheral to time the DMA leaving the PWM peripheral free for standard audio. Perhaps your ALSA device is using high quality audio. If that's the case you need to use the PWM peripheral to time the DMA leaving the PCM peripheral free for high quality audio. To do that from C use gpioCfgClock. Perhaps gpioCfgClock(/* ...


4

Connect a relay or an NPN transistor to bridge the two sides of your switch and program the Pi to set the base of the transistor or relay to high for about half a second - as if a button were being pressed.


3

I originally flagged this as being, possibly seriously, Off-Topic but technically there is a further method that make it possible to connect a graphics card to the RPi and have the latter generate content that is displayed on the former. It is called, *inserts drum-roll*: "X11" and is what is involved when you run an X server on your PC Desktop (which has ...


3

It's probably not exactly what the original question had in mind... but technically, it is possible to connect graphic cards to the Raspberry Pi using a bus it provides, namely USB. However, it seems unlikely that it will be possible to get an improved performance over the embedded GPU. It is also noteworthy that there might be significant issues with such ...


3

pigpio has a Python module which can control the GPIO of a networked Pi from a Windows, Mac, or Linux PC.


3

It is a warning only and may safely be ignored. The warning is telling you that another program told Linux it wanted to use that gpio. It's all to do with Linux "exporting" the gpio to be visible to a user, so an ordinary user can read and write the gpio. The external program should have "unexported" the gpio when it was finished. The warning should not ...


2

The recent GPIO Zero release (1.4) includes several new chapters on remote GPIO: Configuring Remote GPIO Remote GPIO Recipes I should add that this is achieved via Joan's excellent pigpio package, mentioned in the other answer (GPIO Zero is just configured to use pigpio as its pin driver instead of the current default of RPi.GPIO).


2

The short answer is yes. The long answer is yes, but... 3.3VDC is enough to run a low speed fan provided its designed for 3.3VDC. I wouldn't try anything larger than a 40mm fan like this one, and this is why: the larger the fan blades are, the more torque is required to turn them, in in turn requires more power. When you only have 3.3 volts, it takes ...


2

The DS18B20 is a (Dallas) 1-wire bus temperature sensor. It uses one wire for control and data. Early versions of Pi software only allowed for the 1-wire bus to be started on GPIO4. You are looking at old or incomplete tutorials. Recent versions of Pi software allow the 1-wire bus to started on any spare GPIO. There is still the limit of just one bus ...


2

I would not recommend calling a transistor a relay. While they would do essentially the same thing in this particular case (switch an electrical signal) they're technically different with respect to how they are driven and what kind of signal they switch. I will assume to drive an LED here (joan's answer mentions that additional considerations might be ...


2

If GPIO X has been exported then the directory /sys/class/gpio/gpioX will exist. E.g. if GPIO 4 has been exported $ ls /sys/class/gpio export gpio4 gpiochip0 gpiochip100 unexport If it has been exported the directory will have the following entries. $ ls /sys/class/gpio/gpio4 active_low device direction edge power subsystem uevent value To ...


2

Not enough rep to comment, so here's a very short answer. If your MOSFET is too 'stiff', you can add a BJT driver, i.e. a bipolar transistor stage that will accept the GPIO input and will pilot the fet in the second stage with the required voltage. See the answer to this question for a schematic: https://electronics.stackexchange.com/questions/169211/using-...


1

That is how Python displays a bytearray. If the character is a printable character it is shown as such (the '}') in your example. If the character is not printable it is displayed in escaped format, e.g. \xAB where A and B are hexadecimal digits. For your example '\x01\xc2\x00\x00\x01\xcc\xed\x00}' the 9 returned bytes are Hex Dec 1 01 1 2 C2 194 ...


1

You can draw up to 800 mA from the Pi 3.3V. See Raspberry Pi Power Limitations Why you would want to run a fan (3.3V or other) on the Pi is a mystery.


1

I found the completed solution for your issue: RPi.GPIO basics 3 – How to Exit GPIO programs cleanly, avoid warnings and protect your Pi I see this is the best way to other answers. Basically you have to call cleanup. import RPi.GPIO as GPIO # do stuff … # … left blank for the reader to fill in … # … then perform a clean exit: GPIO.cleanup()


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