This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//created by prasant | |
//all right reserved to electronify.org | |
//you can copy edit or do what ever with this code | |
#include <Wire.h> | |
#include "RTClib.h" | |
#include <LiquidCrystal.h> | |
LiquidCrystal lcd(12, 13, 8, 9, 10, 11); | |
RTC_DS1307 RTC; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define F_CPU 1000000UL | |
#include <avr/io.h> | |
#include <util/delay.h> | |
int main(void) | |
{ | |
DDRC = 0xFF; // Configure PORTA as output | |
while(1) | |
{ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Glcd module connections | |
char GLCD_DataPort at PORTD; | |
sbit GLCD_CS1 at RC0_bit; | |
sbit GLCD_CS2 at RC1_bit; | |
sbit GLCD_RS at RB3_bit; | |
sbit GLCD_RW at RB4_bit; | |
sbit GLCD_EN at RB5_bit; | |
sbit GLCD_RST at RE2_bit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <LiquidCrystal.h> | |
LiquidCrystal lcd(13, 12, 11, 10, 9, 8); | |
byte sensorPin[] = {0,1,2,3,4,5,6,7}; | |
byte ledPin[] = {17,16,15,14}; // number of leds = numbers of sensors | |
const byte sensors = 8; | |
const byte leds=4; | |
int motor = A4; | |
int buzzer = A5; | |
void setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//created and modified by prasant | |
//All right reserved to electronify.org | |
//you can modify and share this code freely | |
#include <LiquidCrystal.h> | |
LiquidCrystal lcd(13, 12, 11, 10, 9, 8); | |
#define PIR_sensor 14 | |
#define counter 7 | |
#define m11 0 | |
#define m12 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 7 SEGMENT CONNECTION | |
#define A 2 | |
#define B 3 | |
#define C 4 | |
#define D 5 | |
#define E 6 | |
#define F 7 | |
#define G 8 | |
#define DP 9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <LiquidCrystal.h> | |
LiquidCrystal lcd(13, 12, 11, 10, 9, 8); | |
#define PIR_sensor 14 | |
#define m11 0 | |
#define m12 1 | |
void setup() | |
{ | |
lcd.begin(20, 4); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Display_Utils.h" | |
unsigned short shifter, portb_index; | |
unsigned int digit, number; | |
unsigned short portb_array[4]; | |
void interrupt() { | |
PORTA = 0; // Turn off all 7seg displays | |
PORTB = portb_array[portb_index]; // bring appropriate value to PORTD | |
PORTA = shifter; // turn on appropriate 7seg. display |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
created by prasant | |
www.electronify.org | |
you can do what ever you want with this piece of code | |
*/ | |
#include <LiquidCrystal.h>` | |
LiquidCrystal lcd(10, 9, 8, 7, 6, 5); | |
int incomingByte = 0; // for incoming serial data | |
const int relayPin1 = 13; // the number of the relay pin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
created by prasant | |
www.electronify.org | |
you can do what ever you want with this piece of code | |
*/ | |
const int buttonPin1 = 14; // the number of the pushbutton pin | |
const int buttonPin2 = 15; | |
const int buttonPin3 = 16; | |
int buttonState1 = 0; // variable for reading the pushbutton status |
NewerOlder