Skip to content

Instantly share code, notes, and snippets.

Hardware Mode!

Shiva Shankar shankar-shiv

Hardware Mode!
View GitHub Profile
shankar-shiv / USART.c
Last active Mar 16, 2019
USART initialisation for ATmega48A/PA/88A/PA/168A/PA/328/P
View USART.c
Quick and dirty functions that make serial communications work.
Note that receiveByte() blocks -- it sits and waits _forever_ for
a byte to come in. If you're doing anything that's more interesting,
you'll want to implement this with interrupts.
initUSART requires BAUDRATE to be defined in order to calculate
the bit-rate multiplier. 9600 is a reasonable default.
shankar-shiv /
Created Dec 11, 2018 — forked from radames/
OpenCV VideoCapture running on PyGame
import pygame
from pygame.locals import *
import cv2
import numpy as np
import sys
camera = cv2.VideoCapture(0)
pygame.display.set_caption("OpenCV camera stream on Pygame")
screen = pygame.display.set_mode([1280,720])
View vimrc
" Author : Shankar (sangha)
"" Searching
set hlsearch " highlight matches
set incsearch " incremental searching
set ignorecase " searches are case insensitive...
set smartcase " ... unless they contain at least one capital letter
View makefile
LIBS = -lm
CC = gcc
CFLAGS = -g -Wall
.PHONY: default all clean
default: $(TARGET)
all: default
View settings.json
"cSpell.userWords": [
"editor.formatOnSave": true,
"editor.minimap.enabled": false,
"editor.rulers": [
"files.autoSave": "onFocusChange",
You can’t perform that action at this time.