Skip to content

Instantly share code, notes, and snippets.

View prasant1010's full-sized avatar

Prasant prasant1010

View GitHub Profile
int led = 13;
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
#ifndef F_CPU
#define F_CPU 1000000UL
#endif
#include <avr/io.h>
#include <util/delay.h>
int main(void)
{
     DDRA=0b00000001;
while(1)
#ifndef F_CPU
#define F_CPU 1000000UL
#endif
#include <avr/io.h>
#include <util/delay.h>
int main(void)
{
DDRA=0x01;
while(1)
#ifndef F_CPU
#define F_CPU 1000000UL
#endif
#include <avr/io.h>
#include <util/delay.h>
int main(void)
{
DDRA|=(1<<PINA0);
#ifndef F_CPU
#define F_CPU 1000000UL
#endif
#include <avr/io.h>
#include <util/delay.h>
int main(void)
{
DDRA|=(1<<PINA0);
while(1)
/*
The following blink LED program will blink the LEDs first from PC.0 to PC.7 and then from PC.7 to PC.0
*/
# define F_CPU 1000000UL
#include<avr/io.h>//calling header file avr input & output
#include<util/delay.h>//calling delay header file
int main(void)
{
DDRC=0B11111111; //PORTB as OUTPUT
/*
* GccApplication29.c
*
* Created: 3/26/2016 7:30:37 PM
* Author: keshab
*/
#ifndef F_CPU
# define F_CPU 1000000UL
/*
button_interfacing.c
* Created: 3/26/2016 7:30:37 PM
*  Author: prasant
*/
#include <avr/io.h>
int main(void)
{
DDRA|=(1<<PINA0);
DDRB|=(0<<PINB0);
#include avr/io.h;
#include util/delay.h;
void process_button_press(int button_pressed);
void process_button_release(int button_release);
int one_count[2];
int zero_count[2] ;
int pressed[2];