diff options
author | meyma <devnull@localhost> | 2007-02-22 15:27:02 +0100 |
---|---|---|
committer | meyma <devnull@localhost> | 2007-02-22 15:27:02 +0100 |
commit | dc8b1cde313f3f8a60462187bbeeea4277fd0313 (patch) | |
tree | 02c427d6089d7d9c9b10197ca527ff5d561d82f9 /source | |
parent | d7ac8f546afb75bd2d626b5cc639939337560cf6 (diff) | |
download | rc2007-soccer-dc8b1cde313f3f8a60462187bbeeea4277fd0313.tar rc2007-soccer-dc8b1cde313f3f8a60462187bbeeea4277fd0313.zip |
Additional Codework on Distance_Sensor
Diffstat (limited to 'source')
-rwxr-xr-x | source/Concept/Framework/atmega128io.c | 4 | ||||
-rwxr-xr-x | source/Concept/Framework/modules/input/distance_sensor.h | 5 | ||||
-rwxr-xr-x | source/Concept/Framework/robot.c | 5 |
3 files changed, 10 insertions, 4 deletions
diff --git a/source/Concept/Framework/atmega128io.c b/source/Concept/Framework/atmega128io.c index 94e0f94..e077a98 100755 --- a/source/Concept/Framework/atmega128io.c +++ b/source/Concept/Framework/atmega128io.c @@ -595,8 +595,8 @@ void uart1_puts_p(const char *progmem_s ) int8 Init_TWI(void){ TWAR = OWN_ADR; /*!< Eigenen Slave Adresse setzen */ - TWBR = 12; /*!< Setze Baudrate auf 100 KHz */ - /*!< 4 MHz xtal */ + TWBR = 64; /*!< Setze Baudrate auf 100 KHz */ + /*!< 16 MHz xtal */ TWCR = (1<<TWEN); /*!< TWI-Interface einschalten */ return 1; diff --git a/source/Concept/Framework/modules/input/distance_sensor.h b/source/Concept/Framework/modules/input/distance_sensor.h index 9efa021..9fb2c58 100755 --- a/source/Concept/Framework/modules/input/distance_sensor.h +++ b/source/Concept/Framework/modules/input/distance_sensor.h @@ -50,7 +50,10 @@ public: default: this->slaveAddr = 0;
break;
- }
+ } + + // initialiate the sensor + srf10_init();
}
protected:
diff --git a/source/Concept/Framework/robot.c b/source/Concept/Framework/robot.c index 0e4e9ac..9985463 100755 --- a/source/Concept/Framework/robot.c +++ b/source/Concept/Framework/robot.c @@ -42,7 +42,10 @@ Robot::Robot() TCCR3B = (1<<ICNC3) | (1<<CS31); // set clock/prescaler 1/8 -> enable counter
//Activate interrupt
- sei();
+ sei(); + + // Initialiate TWI + Init_TWI();
//Interface
for(uint8 i = IO_START; i < IO_END; i++)
|