Skip to content

Instantly share code, notes, and snippets.

@michaelsarduino
Created July 15, 2015 15:02
Show Gist options
  • Save michaelsarduino/ea149bebf41f84343324 to your computer and use it in GitHub Desktop.
Save michaelsarduino/ea149bebf41f84343324 to your computer and use it in GitHub Desktop.
Das ist ein Programm, das zeigt, wie man eine Bibliothek, in ein C Programm, einbinden kann.
/*
* GccApplication1.cpp
*
* Created: 15.07.2015 16:29:05
* Author: Michael
*/
#include <avr/io.h>
#include "C:\Users\Michael\Documents\Atmel Studio\6.2\Durchschnitt_erechnen\Durchschnitt_erechnen\Durchschnitt_erechnen.c"
int main(void)
{
DDRB = 0b111111;
while(1)
{
float experiment = durchschnitt(0, 1,);
if(experiment >= 0.5)
{
PORTB = 0b111111;
}
else {
PORTB = 0b000000;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment