Skip to content

Instantly share code, notes, and snippets.

View bbevan's full-sized avatar
🏠
Working from home

Brandon Bevan bbevan

🏠
Working from home
  • Georgia Southern University
View GitHub Profile
#--------------------------------------
# ___ ___ _ ____
# / _ \/ _ \(_) __/__ __ __
# / , _/ ___/ /\ \/ _ \/ // /
# /_/|_/_/ /_/___/ .__/\_, /
# /_/ /___/
#
# lcd_i2c.py
# LCD test script using I2C backpack.
# Supports 16x2 and 20x4 screens.
@bbevan
bbevan / underscan.md
Last active January 17, 2020 16:05
Philips TV HDMI Resolution Issue on Ubuntu

sudo nvidia-settings

Set resolution to 1280x720. Underscan by 10-15 to fix resolution.

@bbevan
bbevan / Student.py
Created January 17, 2020 14:05
Add Student Names to a List
class Student:
def __init__(self):
self.list = []
def add_name(self):
name = input("Student: ")
self.list.append(name) if name else self.add_name()
@bbevan
bbevan / gist:3d6dd08ea4084f8679dd9c5dd560b8c3
Last active January 4, 2020 16:49
Arduino Binary Adder
// 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()
{
@bbevan
bbevan / bollyhoo.md
Last active January 4, 2020 02:32
Accessing the Arduino via Ubuntu

Arduino on Ubuntu

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
@bbevan
bbevan / gist:eb7cbb1f11db4f59a452eaac5a67de75
Last active September 14, 2018 23:18 — forked from CristinaSolana/gist:1885435
Keeping the susedoc develop fork up to date

1. Clone your fork:

git clone https://github.com/bbevan/doc-sle.git

2. Add remote from original repository in your forked repository:

cd doc-sle/
git remote add upstream https://github.com/SUSE/doc-sle.git
git fetch upstream
@bbevan
bbevan / pandocstyle.md
Created September 14, 2018 12:03
Running pandoc with style

Styling Markdown with Pandoc

The following renders blog.md as CSS stylized HTML.

> pandoc -c pandoc.css -o index.html blog.md

Here's an example CSS file. Save as pandoc.css in your markdown folder.

How to Install Git on openSUSE-leap 15.0

One simple command

sudo zypper install git

Watch what happens...

brandon@linux-3sb5:~> sudo zypper install git