Revision c874b753
Fixed paintboard code
Added servo initialization and more internal_data array entries
paintboard/code/Makefile | ||
---|---|---|
8 | 8 |
avr-objcopy -j .text -j .data -O ihex $< $@ |
9 | 9 |
|
10 | 10 |
paint.elf: $(SRC) $(HDR) |
11 |
avr-gcc -mmcu=atmega168 -DF_CPU=8000000UL $(SRC) -o paint.elf -Os
|
|
11 |
avr-gcc -mmcu=atmega328 -DF_CPU=8000000UL $(SRC) -o paint.elf -Os
|
|
12 | 12 |
|
13 |
download: paint.hex
|
|
14 |
avrdude -c avrispmkII -p m168 -P usb -B 1 -U flash:w:paint.hex
|
|
13 |
program: paint.hex
|
|
14 |
avrdude -c avrispmkII -p m328 -P usb -B 1 -U flash:w:paint.hex
|
|
15 | 15 |
|
16 | 16 |
clean: |
17 | 17 |
rm -f paint.elf paint.hex |
paintboard/code/main.c | ||
---|---|---|
39 | 39 |
0, |
40 | 40 |
0, |
41 | 41 |
0, |
42 |
0, |
|
43 |
0, |
|
44 |
0, |
|
42 | 45 |
0 |
43 | 46 |
}; |
44 | 47 |
|
... | ... | |
98 | 101 |
twi_setAddress(TRACKING_ID); |
99 | 102 |
twi_init(); |
100 | 103 |
motor_init(); |
104 |
servo_init(); |
|
101 | 105 |
while (1) |
102 | 106 |
{ |
103 | 107 |
internal_data[PAINT_INPUT_1] = !(!(_BV(METAL_DETECT) & PIND)); |
Also available in: Unified diff