Skip to content

Instantly share code, notes, and snippets.

Avatar
🛠️
Hardware Mode!

Shiva Shankar shankar-shiv

🛠️
Hardware Mode!
View GitHub Profile
@shankar-shiv
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
shankar-shiv / opencv_video_to_pygame.py
Created Dec 11, 2018 — forked from radames/opencv_video_to_pygame.py
OpenCV VideoCapture running on PyGame
View opencv_video_to_pygame.py
import pygame
from pygame.locals import *
import cv2
import numpy as np
import sys
camera = cv2.VideoCapture(0)
pygame.init()
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
TARGET = a
LIBS = -lm
CC = gcc
CFLAGS = -g -Wall
.PHONY: default all clean
default: $(TARGET)
all: default
View settings.json
{
"cSpell.userWords": [
"zymotic"
],
"editor.formatOnSave": true,
"editor.minimap.enabled": false,
"editor.rulers": [
79,
],
"files.autoSave": "onFocusChange",
You can’t perform that action at this time.