Revision 1c3c96ce
ID | 1c3c96ce8316e2bdeeb5aabaf8be4d184121a91e |
Added and tested range sensor to scout_avr
Max output should be 37500 (max observed value actually ~38600), and it
may be scaled down later. Also, the second sonar will need to be added
later... forgot about that...
Also, added an option to avrdude in the Makefile which makes it upload
amazingly faster :D
scout_avr/src/Atmega128rfa1.cpp | ||
---|---|---|
41 | 41 |
{ |
42 | 42 |
// === init serial === |
43 | 43 |
// baud = F_CPU / (16 (UBRR + 1)) |
44 |
uint16_t ubrr = F_CPU / 16 / 38400 - 1;
|
|
44 |
uint16_t ubrr = F_CPU / 16 / BAUD_RATE - 1;
|
|
45 | 45 |
UBRR0H = ubrr >> 8; |
46 | 46 |
UBRR0L = ubrr; |
47 | 47 |
// UMSEL0 = 0, asynchronous usart |
Also available in: Unified diff