Wie involviere ich das jetzt in einem Programm?
habe da nun schon ne weile dran rumgebastelt... komme aber nicht zur lösung...

wäre um nen kleinen hinweis froh!

Code:
#include "RP6RobotBaseLib.h"
int main(void)
{
      initRobotBase();
      startStopwatch1();
      while(true)
      {
            if(getStopwatch1() > 300)
            {

                  writeString_P("\nADC Akku: ");
                  writeInteger(adcBat, DEC);
                  writeChar('\n');
                  
                  if(adcBat < 1000)
                  		setLEDs(0b011111);

                  if(adcBat < 900)
                  		setLEDs(0b001111);
                  		
						if(adcBat < 800)
                  		setLEDs(0b000111);
                  		
                  if(adcBat < 700)
                  		setLEDs(0b000011);
                  		
                  if(adcBat < 600)
                  		setLEDs(0b000001);
                   if(adcBat < 550)
                  		setLEDs(0b000000);
                  		
                  setStopwatch1(0);
				}
            
            task_ADC();
      }                
      return 0;          
}