31 lines
369 B
C
Executable file
31 lines
369 B
C
Executable file
/*
|
|
* controletptestxddd.c
|
|
*
|
|
* Created: 04/04/2021 15:10:52
|
|
* Author : Alzyohan
|
|
*/
|
|
|
|
#include <avr/io.h>
|
|
|
|
|
|
int main(void)
|
|
{
|
|
DDRC=0xFF; //en sortie (led)
|
|
DDRB=0x00; //en entrée (bouton poussoir)
|
|
while (1)
|
|
{
|
|
if((PINB & (1<<PB0))==0)
|
|
{
|
|
PORTC=~('<');
|
|
}
|
|
if((PINB & (1<<PB1))==0)
|
|
{
|
|
PORTC=~('>');
|
|
}
|
|
else
|
|
{
|
|
PORTC=0xFF;
|
|
};
|
|
};
|
|
}
|
|
|