Trouble with 2.2" TFT LCD Display

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Dylan_Cullen
 
Posts: 2
Joined: Wed Feb 28, 2018 3:44 pm

Trouble with 2.2" TFT LCD Display

Post by Dylan_Cullen »

Hello,
I am currently attempting to run a 2.2” TFT LCD display (https://www.adafruit.com/product/1480) on a BeagleBone Green Wireless. I am following an Adafruit tutorial (found here https://learn.adafruit.com/user-space-s ... li9341-2-8 ). Though the tutorial is not specifically made for this configuration, Matthew McMillian has accomplished this and has his experience (http://matthewcmcmillan.blogspot.com/20 ... nWZkbrkNGJ) linked to in the Adafruit tutorial. After retrieving the Adafruit ILI9341 library the setup.py install script was run using the following command:

Code: Select all

sudo python setup.py install 
Once this script is executed I attempt to run the example image.py and it fails. Here is the output I receive from this:

Code: Select all

admini@beaglebone:~/Adafruit_Python_ILI9341-master$ sudo python examples/image.py 
Traceback (most recent call last):
  File "examples/image.py", line 41, in <module>
    disp = TFT.ILI9341(DC, rst=RST, spi=SPI.SpiDev(SPI_PORT, SPI_DEVICE, max_speed_hz=64000000))
  File "build/bdist.linux-armv7l/egg/Adafruit_ILI9341/ILI9341.py", line 137, in __init__
  File "build/bdist.linux-armv7l/egg/Adafruit_GPIO/GPIO.py", line 278, in setup
ValueError: Set gpio direction failed, missing file or invalid permissions.
Upon receiving this error, and after searching through several forum posts, I have been unable to find a solution to this error. Below are some commands run on my BeagleBone to provide further information:

Code: Select all

cat /etc/issue 
Debian GNU/Linux 9 \n \l

BeagleBoard.org Debian Image 2017-08-31

Support/FAQ: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian

Default username:password is [debian:temppwd]
cat /etc/dogtag
BeagleBoard.org Debian Image 2017-08-31
uname –a 
Linux beaglebone 4.9.45-ti-r57 #1 SMP PREEMPT Fri Aug 25 22:58:38 UTC 2017 armv71 GNU/Linux
Additionally, I have included the following line to /boot/uEnv

Code: Select all

Optargs=capemgr.enable_partno=BB-SPIDEVO
To ensure access to the SPI pins, the following command was run

Code: Select all

ls -la /dev/spi*
crw-rw---- 1 root spi 153, 1 Feb 27 17:00 /dev/spidev1.0
crw-rw---- 1 root spi 153, 1 Feb 27 17:00 /dev/spidev1.1
crw-rw---- 1 root spi 153, 1 Feb 27 17:00 /dev/spidev2.0
crw-rw---- 1 root spi 153, 1 Feb 27 17:00 /dev/spidev2.1
Any information on this error would be greatly appreciated.

User avatar
drewfustini
 
Posts: 944
Joined: Sat Dec 26, 2015 1:19 pm

Re: Trouble with 2.2" TFT LCD Display

Post by drewfustini »

Please paste the output of these commands:

Code: Select all

sudo /opt/scripts/tools/version.sh

cat /boot/uEnv.txt

User avatar
Dylan_Cullen
 
Posts: 2
Joined: Wed Feb 28, 2018 3:44 pm

Re: Trouble with 2.2" TFT LCD Display

Post by Dylan_Cullen »

I greatly appreciate the reply. Fortunately I spoke with my colleague about the issue I was encountering and he directed me to the following link:
https://vadl.github.io/beagleboneblack/ ... p-bbb-gpio
Using this source I was able to determine my error. Essentially it was required to call each GPIO pin individually in order to properly use them. The series of commands used, found from the above link, are as follows:

Code: Select all

sudo su
cd /sys/class/gpio
echo 27 >  export
cd gpio27
echo out > direction
This series of commands properly configured the required GPIO pins.

Locked
Please be positive and constructive with your questions and comments.

Return to “Beagle Bone & Adafruit Beagle Bone products”