Quantcast
Channel: MSP 低功耗微控制器论坛 - 最近的话题
Viewing all articles
Browse latest Browse all 3634

MSP430F5529 usb开发板 ADC

$
0
0
uint8_t Wheel_getPosition(void)
{
    uint8_t position = 0;
    Wheel_getValue();
    //determine which position the wheel is in
    if (positionData > 0x0806)
        position = 7 - (positionData - 0x0806) / 260;  //scale the data for 8 different positions
    else
        position = positionData / 260;
    return position;
}
下面这句不懂:
    if (positionData > 0x0806)
        position = 7 - (positionData - 0x0806) / 260;  //scale the data for 8 different positions
为什吗是0X0806

Viewing all articles
Browse latest Browse all 3634

Trending Articles