Batterie über M32 Control auslesen
Ich wollte mal des trainings wegens die Batteriespannung über das M32 auslesen, da ich mit dem m32 noch nicht viel gemacht habe stoße ich da auf Probleme.
Code:
#include "RP6ControlLib.h"
#include "RP6I2CmasterTWI.h
int main(void)
{
initRP6Control();
powerOFF(); // Turn on Encoders, Current sensing, ACS and Power LED.
// Main loop
while(true)
{
if(I2C_REG_ADC_UBAT_H > 801)
setLEDs(0b1111);
else if(I2C_REG_ADC_UBAT_L < 800)
setLEDs(0b0001);
setStopwatch1(0);
}
return 0;
}
kann mir da jemand helfen ?
danke carlitoco[/code]