This answer is still correct, and explains in more detail the nature of the changes, but most users of current Raspbian should just run sudo raspi-config Select Interfacing Options / Serial then specify if you want a Serial console (probably no) then if you want the Serial Port hardware enabled (probably yes). Then use /dev/serial0 in any code which accesses ...
finally this got work for my pi3 (os: debian jessie)
please follow these 6 steps carefully.
Step 1 - Install Raspbian Jessie onto a SD card and boot the Pi when connected to a network Login via terminal or desktop and shell Configure the system with:
Expand filesystem and enable serial on advanced page, exit and reboot.
Step 2 -this ...
I think you would call them P*-Headers, where the * designates which one exactly (5/2/3/6).
What you call Opportunity B is known as the P5-Header, and you can use it just like the GPIO-Pins next to it (see also this link).
Opportunity A (P6) can be used to reset your Raspberry Pi: Shorten it it reset. Be careful, though, as doing this while your SD-Card is ...
The Gammu documentation suggests (but doesn't go into any detail of) a workaround,
Edit: Atmel has an Application Note that nicely describes the enumeration process.
Enumeration changes because it happens in a conversation between host, hub and device, and response timing from each of these may vary, even if the setup is identical from one reboot to the ...
I finally solved this, but in a pretty unorthodox way. I abandoned bit-banging as too unreliable and tried to find other solutions which would allow me to the same thing without adding more hardware. I was considering writing a kernel driver, which would trigger an interrupt on GPIO and then reconfigure the pin to be SPI and use SPI to read an entire data ...
Ensure terminal over serial is disabled in raspi-config
and in "Advanced" choose "Serial" (Enable/Disable shell and kernel messages on the serial connection) and disable it.
Steps 2 and 3 should not be necessary if you do this step first, but in case it didn't work - check them also.
Ensure /boot/cmdline.txt has no ttyAMA0
The short answer to your question, how to safely connect the RPi to an Arduino, is indeed given at the first link you posted: http://blog.oscarliang.net/raspberry-pi-arduino-connected-i2c/. I have used the method given there with great success, and without damaging any components.
But your question suggests that you don't trust that method, and I think the ...
It would seem that atleast without the real-time patches (CONFIG_PREEMPT_RT), the Raspberry Pi cannot reliably bit-bang a 9600 baud serial.
I used a simple latency tester which configured all the linux side things optimally (sched_fifo, priority 99, cpu_dma_latench 0us, mlockall). I tried sleeping for 100 µsec (roughly 9600 baud) and checking the latency ...
@LiWi's answer will work temporarily, but the permission change will be lost once the device is removed or the server rebooted.
A permanent solution is to add your user to the dialout group, which will allow it to access serial devices.
sudo usermod -a -G dialout youruser
Naseer's answer is correct but a bit elaborate if you just flashed the latest rasbian. All I needed to do, is just to add the following line to my config.txt (from e.g. windows where you plug in the SD card on the fat32 partition):
Then plug it in, and the pi will directly print stuff on the console pins.
It is possible to connect the RPI to other devices via spi.
You need to enable the kernel module and allow yourself access to the device.
sudo modprobe spi_bcm2708
sudo chown `id -u`.`id -g` /dev/spidev0.*
Then you can use this c file to test the dpi-device: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob_plain;f=Documentation/spi/...
You've partially answered your own question, but there is another way of doing it, especially for serial devices: the /dev/serial/* paths. I have a Prolific USB→RS232 interface on my Raspberry Pi which almost invariably shows up as /dev/ttyUSB0. But it also appears on the system as:
The Pi's UART has a fault (in the firmware). Whenever the port is opened there is a 30 µs low glitch on TXD.
See http://elinux.org/RPi_Serial_Connection#Unwanted_serial_garbage_input and search for glitch.
You will need to find a workaround as the fault will not be fixed.
From man 5 crontab:
Step values can be used in conjunction with ranges. Following a range with "/<number>" specifies skips of the number's value through the
range. For example, "0-23/2" can be used in the 'hours' field to specify command execution for every other hour (the alternative in the V7
standard is "0,2,4,6,8,10,12,14,16,...
cat /proc/cpuinfo | grep Revision
RPi 2 boards will show board revisions a*1040, a*1041 or a*2042, while an RPi 3 board will give you a*2082. Here's a list of board revisions.
See also: Getting Your Raspberry Pi Revision Number Using Python.
Given the significant differences in the voltage levels it is not safe to directly connect any RS232 signal lines to the Pi's GPIO. Even if the voltage of some RS232 drivers might be as low as 3 V, the logic one (called "mark") is represented as a negative voltage which will kill the Pi.
The standard specifies a maximum open-circuit ...
When [a] [Raspberry Pi] starts, I understand that it writes [boot messages] [to the serial port]. Can I disable [these messages] ?
Yes, you can find instructions in several places including Hobbytronics
Disable Serial Port Login
To enable the serial port for your own use you need to disable login on the port. There are two files that need to be ...
To talk to a serial device using Python, use the pyserial module. If it is not available in your distribution, it can be installed by getting a copy of the source from the pyserial project page and running "python setup.py install"
Simple examples of using pyserial are available at the short introduction.
The module for the PL-2303 is available by default -...
What you are referring to is called Software Serial, where bytes are bit banged and create the same effect as a serial port.
Using a normal Linux distribution the answer is, No. The reason is because bit banging required real time processing of data, otherwise the data will just be junk.
This answer at Electronics Stack shows a USB board with 4 hardware ...
If you don't want to spare your USB port of your Rpi, you can use GPIO Serial to communicate with your Arduino. There is a great tutorial of Conor O'Neill for connecting Rpi with a Arduino Pro Mini. The procedure is the same with your Arduino Uno.
All you need is a LLC (Logic Level Converter) to be able to connect these two devices. As you've already ...
For basic network communication nc or netcat, as suggested by joan, is sufficient. However, if you for example want to forward a serial console or encrypt the connection socat is probably more convenient. For inspiration here are two working examples of the mentioned applications.
Serial console via TCP
To connect directly to the serial port with socat ...
Wand has a display module/method.
In the terminal
$ python -m wand.display wandtests/assets/mona-lisa.jpg
In a Python script
with Image(blob=file_data) as image:
Any answer might only be of limited help to you as long as you have not understood how SPI actually works, so you should take a detailed look at this interface.
Concerning question 1:
SPI is a master-slave-system where any interaction has to be initiated by the master. The sensor itself is not able to write to the master, instead it is read by the master (...
The properties of a USB serial converter have nothing to do with the hardware of the hosting system, but only with the USB serial chip itself, and the software stack of the hosting system.
The pi should be using stock Linux USB serial drivers.
Therefore, you can enable/disable the linkage of DTR to port open/close via the usual Linux method of clearing the ...
@ChrisStrattons post describes how to use stty -F /dev/ttyUSB0 to avoid the hangup which results in a reset. Here is a snippet to do it in Python:
path = '/dev/ttyACM0'
# Disable reset after hangup
with open(path) as f:
attrs = termios.tcgetattr(f)
attrs = attrs & ~termios.HUPCL
termios.tcsetattr(f, termios.TCSAFLUSH, ...
If you're using an X11 Desktop Environment such as LXDE, then you can accomplish this using the basic logic shown in this article.
Here's what I came up with to switch displaying two images waiting 30 seconds between each switch. You should be able to insert your logic for switching the images based on what you read from your RFID sensor.