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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 <stdio.h> | |
void main(int argc, char[] argv) { | |
printf("hello, world!\n"); | |
} |
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
// ------- Preamble ------- // | |
#include <avr/io.h> | |
#include <util/delay.h> /* Time delay function */ | |
#define DELAYTIME 250 /* milliseconds */ | |
#define LED_PORT PORTB | |
#define LED_DDR DDRB | |
int main(void) { |
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
// ------- Preamble ------- // | |
#include <avr/io.h> | |
#include <util/delay.h> /* Time delay function */ | |
#define DELAYTIME 250 /* milliseconds */ | |
#define LED_PORT PORTB | |
#define LED_DDR DDRB | |
int main(void) { |
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
Usage: avrdude [options] | |
Options: | |
-p <partno> Required. Specify AVR device. | |
-b <baudrate> Override RS-232 baud rate. | |
-B <bitclock> Specify JTAG/STK500v2 bit clock period (us). | |
-C <config-file> Specify location of configuration file. | |
-c <programmer> Specify programmer type. | |
-D Disable auto erase for flash memory | |
-i <delay> ISP Clock Delay [in microseconds] | |
-P <port> Specify connection port. |
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
/* | |
* lab1.c | |
* | |
* Created: 12/23/2015 6:18:56 PM | |
* Author : mahir | |
*/ | |
#include <avr/io.h> | |
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
mahir@ubuntu:~$ avrdude | |
Usage: avrdude [options] | |
Options: | |
-p <partno> Required. Specify AVR device. | |
-b <baudrate> Override RS-232 baud rate. | |
-B <bitclock> Specify JTAG/STK500v2 bit clock period (us). | |
-C <config-file> Specify location of configuration file. | |
-c <programmer> Specify programmer type. | |
-D Disable auto erase for flash memory | |
-i <delay> ISP Clock Delay [in microseconds] |
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
##########------------------------------------------------------########## | |
########## Project-specific Details ########## | |
########## Check these every time you start a new project ########## | |
########## or when you change your MCU or USB PORT ########## | |
##########------------------------------------------------------########## | |
MCU = atmega8 ## Name of your microcontroller device. | |
F_CPU = 8000000UL ## Frequency | |
BAUD = 19200 ## BAUD rate | |
PORT = /dev/ttyUSB0 ## USB PORT of your computer |
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
// Preamble | |
#include <avr/io.h> | |
#include <util/delay.h> /* Time delay function */ | |
// Function definitions | |
#define LED_DDR DDRB | |
#define LED_PORT PORTB | |
//main function | |
int main(void) |
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
[comment] | |
anything written on the right side of `//` notation, i.e on | |
lines 1, 5, 9, 12, 13, 15, 17, 18, 20, 21 and 23. | |
[includes] | |
lines 2-3, here include other important files for your present projects. | |
[function definitions] | |
lines 6-7, define global variables and other functions | |
or include library of a function. |
OlderNewer