Project

General

Profile

Revision 213

fixed cardbox code for new board, updated tooltron.py for new cardbox

View differences:

main.c
32 32

  
33 33
#define RELAY       _BV(PORTD4)
34 34
#define VAC_SENSE   _BV(PIND3)
35
#define BUT_RED     _BV(PINB4)
36
#define BUT_BLACK   _BV(PINB3)
35
#define BUT_RED     _BV(PINB4)#define BUT_BLACK   _BV(PINB3)
37 36
#define LED_GREEN   _BV(PORTB2)
38 37
#define LED_YELLOW  _BV(PORTB1)
39 38
#define LED_RED     _BV(PORTB0)
......
108 107

  
109 108
    uint8_t r;
110 109

  
111
    //eeprom_write_byte(1, 18);
110
    //eeprom_write_byte(1, 12);
112 111

  
113 112
    PORTB = 0x7;
114 113

  
115
    /* myaddr = eeprom_read_byte(1); */
116
    /* if (myaddr == 18) { */
117
    /*    PORTB = 0x7; */
118
    /* } */
119
    /* _delay_ms(1000); */
120
    /* PORTB |= _BV(PORTB0); */
121
    /* _delay_ms(1000); */
122
    /* reset(); */
114
    myaddr = eeprom_read_byte(1);
115
    if (myaddr == 11) {
116
       PORTB = 0;
117
       while(1);
118
    }
119
    _delay_ms(1000);
120
    PORTB |= _BV(PORTB0);
121
    _delay_ms(1000);
122
    reset();
123 123

  
124 124
    while(1) {
125
        _delay_ms(1000);
125
    	_delay_ms(1000);
126 126
        PORTB |= _BV(PORTB0);
127 127
        _delay_ms(1000);
128 128
        PORTB &= ~_BV(PORTB0);

Also available in: Unified diff