Difference between revisions of "T208-Software"
Line 10: | Line 10: | ||
sudo apt-get install libi2c-dev i2c-tools | sudo apt-get install libi2c-dev i2c-tools | ||
pip install smbus | pip install smbus | ||
− | 5. To check what i2c devices connected | + | 5. To check what i2c devices connected (This is very important!!) |
− | sudo i2cdetect -y -r 1 | + | sudo i2cdetect -y -r 1 |
+ | #(T208 used the I2C address 0x36) | ||
6. To install Nano editor on Ubuntu | 6. To install Nano editor on Ubuntu | ||
sudo apt-get install nano | sudo apt-get install nano | ||
− | 7. | + | 7. Download the sample python file ([[File:Bat.py]]) for i2c battery voltage & percentage reading, then run the following command to test it. |
− | + | sudo python Bat.py | |
− | [[File: | + | 8. Download the sample python file ([[File:Pld.py]]) for AC power loss / power adapter failure detection, then run the following command to test it. |
+ | sudo python Pld.py | ||
+ | '''FAQ''' | ||
+ | A: Found some error | ||
+ | Q: | ||
+ | 1. check your python version with command 'sudo python -v' | ||
+ | |||
+ | 2. check the I2C if is enable with command 'sudo i2cdetect -y -r 1', you can found the result is 0x36 | ||
+ | |||
+ | 3. Configure the appropriate software source, or you can't update. | ||
Return to [[T208]] | Return to [[T208]] |
Revision as of 16:12, 10 August 2020
1. Update software source on Ubuntu, refer to Update software source on Ubuntu
2. To install pip for Python 3 on Ubuntu, run the following commands as root or sudo user in your terminal:
sudo apt-get update sudo apt-get install python-pip
3. To install Jetson GPIO library:
sudo pip install Jetson.GPIO
4. To install I2C dev library
sudo apt-get install libi2c-dev i2c-tools pip install smbus
5. To check what i2c devices connected (This is very important!!)
sudo i2cdetect -y -r 1 #(T208 used the I2C address 0x36)
6. To install Nano editor on Ubuntu
sudo apt-get install nano
7. Download the sample python file (File:Bat.py) for i2c battery voltage & percentage reading, then run the following command to test it.
sudo python Bat.py
8. Download the sample python file (File:Pld.py) for AC power loss / power adapter failure detection, then run the following command to test it.
sudo python Pld.py
FAQ A: Found some error
Q: 1. check your python version with command 'sudo python -v'
2. check the I2C if is enable with command 'sudo i2cdetect -y -r 1', you can found the result is 0x36
3. Configure the appropriate software source, or you can't update.
Return to T208
Enable comment auto-refresher
Anonymous user #2
Permalink |
Lisa
Anonymous user #1
Permalink |
Lisa