You are here: Forum Home → ANT+ Forums → ANT+ Bike Power → Thread
void Send_Battery(void)
{
buf[0]=MESG_TX_SYNC;//SYNC Byte
buf[1]=0x09;//LENGTH Byte
buf[2]=0x4e; //0x4E broadcast||4f for ack
buf[3]=0x00;//Channel number
buf[4]=0x52;//Battery page identifier
buf[5]=0xff;//
buf[6]=0xff;//
buf[7]=1;//operating time LSB
buf[8]=2;//
buf[9]=3;//operating time MSB
buf[10]=0x8b;//battery level
buf[11]=0x32;//battery level in volts and
buf[12]=calc_checksum (buf, 12);
ANTsend (buf, 13) ;
}
while(1)
{
output_toggle(led_red);
delay_ms(500);
Send_Battery();
delay_ms(500);
Send_Power(330);
}