Skip to content

Instantly share code, notes, and snippets.

View raghavendrahassy's full-sized avatar
🎯
Focusing

Gururaghavendra Hasigal raghavendrahassy

🎯
Focusing
View GitHub Profile
#include <SFE_BMP180.h>
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Button.h>
#include <EEPROM.h>
#include "EEPROMAnything.h"
// If using software SPI (the default case):
/*
A set of custom made large numbers for a 16x2 LCD using the
LiquidCrystal librabry. Works with displays compatible with the
Hitachi HD44780 driver.
The Cuicuit:
LCD RS pin to D12
LCD Enable pin to D11
LCD D4 pin to D5
LCD D5 pin to D4
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define OLED_RESET 4
int TIME_UNTIL_WARMUP = 50; // in seconds
unsigned long time;
#include <ESP8266WiFi.h> //https://github.com/esp8266/Arduino
//needed for library
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h> //https://github.com/tzapu/WiFiManager
#include <WiFiClient.h>
#include <PubSubClient.h>
char* mqttserver = "128.199.72.21"; //change this to your server if required
#include<avr/io.h>
#define LED PD4
int main()
{
uint8_t timerOverflowCount=0;
DDRD=0xff; //configure PORTD as output
TCNT0=0x00;
TCCR0 = (1<<CS00) | (1<<CS02);
#include<avr/io.h>
#define LED PD4
int main()
{
DDRD=0xff; //configure PORTD as output
OCR1AH = 0x3d;
OCR1AL = 0x09;
TCCR1B = (1<<CS10) | (1<<CS12);
#include<avr/io.h>
#include<avr/interrupt.h>
#define LED PD4
ISR (TIMER1_OVF_vect) // Timer1 ISR
{
PORTD ^= (1 << LED);
TCNT1H=0xF9; // Reload the 16-bit count value
TCNT1L=0xE6; // in timer1 count registers
#include<avr/io.h>
#include<avr/interrupt.h>
#define LED PD4
ISR (TIMER1_OVF_vect) // Timer1 ISR
{
PORTD ^= (1 << LED);
TCNT1 = 63974; // for 1 sec at 16 MHz
}
#include <avr/io.h>
#include <util/delay.h>
#define Relay PA0
int main()
{
/* Configure the port A0 as Output */
DDRA = (1 << Relay);
#include <avr/io.h>
#include <util/delay.h>
#define SegOne 0x01
#define SegTwo 0x02
#define SegThree 0x04
#define SegFour 0x08