Skip to content

Instantly share code, notes, and snippets.

@michaelsarduino
Created July 13, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelsarduino/3f31ce2f1ffb876ae625 to your computer and use it in GitHub Desktop.
Save michaelsarduino/3f31ce2f1ffb876ae625 to your computer and use it in GitHub Desktop.
Dieser Sketch bringt die LED des Arduino zum blinken.
/*
* GccApplication2.cpp
*
* Created: 13.07.2015 14:24:32
* Author: Michael
*/
#ifndef F_CPU
#define F_CPU 16000000UL
#endif
#include <util/delay.h>
#include <avr/io.h>
int main(void)
{
DDRB = (1 << DDB5);
while(1)
{
PORTB = (1 << DDB5);
_delay_ms(100);
PORTB = (0 << DDB5);
_delay_ms(100);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment