sudo nvidia-settings
Set resolution to 1280x720. Underscan by 10-15 to fix resolution.
| #-------------------------------------- | |
| # ___ ___ _ ____ | |
| # / _ \/ _ \(_) __/__ __ __ | |
| # / , _/ ___/ /\ \/ _ \/ // / | |
| # /_/|_/_/ /_/___/ .__/\_, / | |
| # /_/ /___/ | |
| # | |
| # lcd_i2c.py | |
| # LCD test script using I2C backpack. | |
| # Supports 16x2 and 20x4 screens. |
sudo nvidia-settings
Set resolution to 1280x720. Underscan by 10-15 to fix resolution.
| class Student: | |
| def __init__(self): | |
| self.list = [] | |
| def add_name(self): | |
| name = input("Student: ") | |
| self.list.append(name) if name else self.add_name() |
| // include the library code: | |
| #include <LiquidCrystal.h> | |
| // initialize the library with the numbers of the interface pins | |
| LiquidCrystal lcd(12, 11, 5, 4, 3, 2); | |
| void setup() | |
| { | |
When I moved over to Ubuntu a few months ago, I was in the middle of an Arduino project involving the LCD display of strings via Python's serial module. On my windows device, the board was accessed via Window's Comport 3 (COM3), however Linux does not use that nomenclature as the serial device software is different.
According to Building Embedded Linux Systems: Concepts, Techniques, Tricks, and Traps by Yaghmour et al., serial devices are "uniformly accessed as terminal devices". Those devices are found under /dev/ttyS0 all the way through /dev/ttyS191 (pg. 73).
The problem is that my Python script bugged out an error upon executing the following code.
import serial
ser=serial.Serial("/dev/ttyS0", 9600) #9600 baud connection to the board via the serial port on /dev/ttyS0