Skip to content

Instantly share code, notes, and snippets.

View vinodstanur's full-sized avatar

Vinod S vinodstanur

View GitHub Profile
@vinodstanur
vinodstanur / send.py
Last active August 29, 2015 14:12
Python script to send wav file to attiny13 via UART
import serial, time, sys
import os
#initialize serial port
ser=serial.Serial()
ser.timeout=2
ser.port='/dev/ttyUSB0'
ser.baudrate=115200
ser.open()
ser.flushOutput()
ser.flushInput()
@vinodstanur
vinodstanur / main.c
Last active August 29, 2015 14:12
ATTINY13 WAV PLAYER
#include <avr/io.h>
#define F_CPU 9600000
#include <util/delay.h>
#include <avr/power.h>
#include <avr/interrupt.h>
#define SPI_PORT PORTB
#define SPI_DDR DDRB
#define SPI_PIN PINB
@vinodstanur
vinodstanur / touch.py
Last active December 11, 2015 01:29
Python code for pc side
#!/usr/bin/ipython
import serial,time,re,os
from pymouse import PyMouse
m=PyMouse()
size=m.screen_size()
ser=serial.Serial()
ser.port='/dev/rfcomm2'
ser.baudrate=115200
ser.timeout=.1
@vinodstanur
vinodstanur / mouse.c
Last active December 11, 2015 01:29
touchpad based wireless mouse using ATTiny13
/*
Touchscreen based bluetooth mouse
microcontroller: ATTiny13
author: Vinod S
email: vinodstanur at gmail dot com
date: 12/1/2013
homepage: http://blog.vinu.co.in
compiler: avr-gcc
@vinodstanur
vinodstanur / lcd_stellaris_launchpad.c
Created November 30, 2012 22:50
lcd with stellaris launchpad
/*16x2 lcd with stellaris launchpad...
/----------------------------------------/
CONNECTION TIPS:
RS: PF1
EN:PF2
DATA: PD0 - PD3 to d4 to d7 in lcd respectively
VDD (POWER): connect 5v supply to LCD from the launchpad itself (one of the 3 connection near the switch)
R/W: Ground it
Remaining LCD pins (d0 to d4): Leave it as it is ie floating
VEE of LCD: Pull down using 1K resistor (connect to ground using 1K resistor)
@vinodstanur
vinodstanur / main.c
Created July 17, 2012 22:16
tv remote controlled computer mouse
/* Name: main.c
* Project: TV remote controlled HID-mouse
* Author: Vinod S (http://blog.vinu.co.in)
* (Modified Christian Starkjohann's hid mouse example code seen in VUSB project example folder)
* Creation Date: 12/07/2012
* License: GNU GPL v2
*/
/*
This example should run on most AVRs with only little changes. No special
hardware resources except INT0 are used. You may have to change usbconfig.h for