Arduino workshop: szoftveres teljesítménynövelés (2012. december 13.)
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
void setup() { | |
pinMode(3, OUTPUT); | |
} | |
void loop() { | |
http://hsbp.org | |
PIND |= 8; | |
goto http; | |
} |
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 <avr/io.h> | |
int main() { | |
UBRR0H = 0; | |
UBRR0L = 103; | |
UCSR0B = (1<<RXEN0)|(1<<TXEN0); | |
UCSR0C = (1<<USBS0)|(3<<UCSZ00); | |
while (1) { | |
/* Wait for empty transmit buffer */ | |
while ( !( UCSR0A & (1<<UDRE0)) ); | |
UDR0 = 0x55; | |
UCSR0B = (1<<RXEN0)|(1<<TXEN0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment