Skip to content

Instantly share code, notes, and snippets.

@electronut
electronut / main.c
Created April 30, 2014 15:01
A simple blinky program for ATtiny85
// main.c
//
// A simple blinky program for ATtiny85
// Connect red LED at pin 2 (PB3)
//
// electronut.in
#include <avr/io.h>
#include <util/delay.h>
@electronut
electronut / Makefile
Created April 30, 2014 15:03
Makefile for programming the ATtiny85
# Makefile for programming the ATtiny85
# modified the one generated by CrossPack
DEVICE = attiny85
CLOCK = 8000000
PROGRAMMER = -c usbtiny
OBJECTS = main.o
# for ATTiny85
# see http://www.engbedded.com/fusecalc/
FUSES = -U lfuse:w:0x62:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
@electronut
electronut / ldr.py
Created May 4, 2014 06:14
Display analog data from Arduino using Python (matplotlib animation)
"""
ldr.py
Display analog data from Arduino using Python (matplotlib)
Author: Mahesh Venkitachalam
Website: electronut.in
"""
import sys, serial, argparse
@electronut
electronut / attiny84-hacks.c
Last active August 29, 2015 14:01
Various ATtiny84 hacks
//************************************************************
// attiny84-hacks.c
//
// Various snippets of code that I have developed for
// the ATtiny84
//
// Author: Mahesh Venkitachalam
// Website: electronut.in
//************************************************************
@electronut
electronut / alganal.py
Last active August 29, 2015 14:04
A utility program to plot algorithmic time complexity of a function.
"""
alganal.py
Description:
A utility program to plot algorithmic time complexity of a function.
Author: Mahesh Venkitachalam
Website: electronut.in
"""
@electronut
electronut / koch.py
Last active December 2, 2020 16:34
A program that explores the Koch snowflake and the Thule-Morse sequence.
"""
koch.py
Description:
A program that explores the Koch snowflake and the Thue-Morse sequence.
Author: Mahesh Venkitachalam
Website: electronut.in
"""
@electronut
electronut / test_HW_PWM.py
Created November 22, 2014 14:42
For testing the hardware PWM capabilities of the Raspberry Pi Model A+.
"""
test_HW_PWM.py
For testing the hardware PWM capabilities of the Raspberry Pi Model A+.
Author: Mahesh Venkitachalam
Website: electronut.in
"""
import wiringpi2 as wiringpi
@electronut
electronut / test_HW_PWM_servo.py
Created November 24, 2014 11:21
Driving two servos with the hardware PWM on a Raspberry Pi Model A+.
"""
test_HW_PWM_servo.py
Driving two servos with the hardware PWM on a Raspberry Pi Model A+.
Connect GPIO18 and GPIO13 to servo signal pins. Connect GND of Pi to GND of Ser\
vos. Use separate power supply (5V) for servos.
Author: Mahesh Venkitachalam
Website: electronut.in
@electronut
electronut / dht11_thingspeak.py
Last active December 27, 2016 04:24
Temperature/Humidity monitor using Raspberry Pi and DHT11. Data is displayed at thingspeak.com
"""
dht11_thingspeak.py
Temperature/Humidity monitor using Raspberry Pi and DHT11.
Data is displayed at thingspeak.com
Author: Mahesh Venkitachalam
Website: electronut.in
"""
@electronut
electronut / esp8266_test.ino
Created December 19, 2014 10:11
Plot LM35 data on thingspeak.com using an Arduino and an ESP8266 WiFi module.
// esp8266_test.ino
//
// Plot LM35 data on thingspeak.com using an Arduino and an ESP8266 WiFi
// module.
//
// Author: Mahesh Venkitachalam
// Website: electronut.in
#include <SoftwareSerial.h>
#include <stdlib.h>