wh1p Posted August 12, 2013 Posted August 12, 2013 Source: https://sites.google.com/site/semilleroadt/raspberry-pi-tutorials/gpio This is my first post so any feedback would be appreciated. For those of you who have a Raspberry Pi and either do not have access to a USB UART adapter or just want a backup your Raspberry Pi can be used instead. In order to use the GPIO pins on your Pi as a UART connector you are going to need to edit two system files "/boot/cmdline.txt" and "/etc/inittb" and use a terminal of you choice for the UART connection. Step 1: Backup the system files on you pi. cp /boot/cmdline.txt /boot/cmdline.bak cp /etc/inittab /etc/inittab.bak Step 2: Remove the following parameters from the /boot/cmdline.txt nano /boot/cmdline.txt and delete the following lines: console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 Step 3: Comment out (#) the following line at the bottom of /etc/inittab nano /etc/inittab and add a # at the begging of the following line: T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100 Step 4: (Optional) You may wish to test that your new configuration is working. Connect the RXD and TXD pins on the Pi together (listed below) and install the following python script: http://sourceforge.net/projects/pyserial/files/pyserial/ Then run: python setup.py install and open a python terminal: python and run the following commands import serial ser = serial.Serial("/dev/ttyAMA0") ser.write("UART the Font") read = ser.read() print read ser.close() Success: If setup has worked correctly then the variable set above will be printed on the screen. Step 5: connect the ground, tx and rx connectors. GPIO15 = RXD to TXD on Pineapple GPIO14 = TXD to RXD on Pineapple. GND = GND to GND on Pineapple. GPIO pinout can be found here: http://www.hobbytronics.co.uk/raspberry-pi-gpio-pinout Step 6: Choose a terminal emulator of choice, here we will use minicom. apt-get install minicom Then create the connection: minicom -b 115200 -o -D /dev/ttyAMA0 If everything was successful on your pineapple you should now have a serial connection to your pineapple :). Quote
inTheDMZ Posted August 12, 2013 Posted August 12, 2013 Maybe you could do a video tutorial for adding to the wiki? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.