Errata

I was wondering about the fluctuations of the ultra sonic values. So I did a review of the programs. After a search for days I have found the error: The ultrasonic sensor was defective. But I found some other mistakes too. And here they are:

At the top of the main programs in the declaration You have to change:

*4DigitPD4Line-MIn
**4DigitPD4PushbuttonIn - Alternative to Line-M for "Maze"
*5OC0BPD5PWM-BOut
*6OC0APD6PWM-AOut
*7PCINT23PD7Color-2In - DDRD = 0b01101000
**7DigitPD7PushbuttonIn - Alternative to Color-1 for "Line"
*8DigitPB0Motor-BOut
*9DigitPB1Motor-AOut
*10DigitPB2Line-LIn
*11PCINT3PB3Color-1In

 

In correlation with it: The header Drive_Functions.h have to be changed.

And the part that´s so important to me, the time saving USART-Functions, didn´t save so much time I thought. There was an ugly little mistake. But now, I swear, it saves the time! To transmit a digit from the ATMega328P to your computer only 2 - 5 microseconds are needed.

The last correction, for the moment: At the header Init.h

    TCCR0A = 0b10100011; //Fast PWM, Clear OC0x on compare match, set OC0x at BOTTOM
    TCCR0B = 0b00000011;//00doesn´t matter,00unimpl.,0PWM,011TMR0-Pres1:64

The PWM was to fast and the wave form doesn´t fit.

And, of course, there are no UV (Ultra Violet) sensors, but only IR (Infra Red).