I am new to this kind of calculation in java. Here I come up with a task that I will get a Hexadecimal value from CAN , it contains CANId and some value for parameters like wheel speed, engine speed,
If my CANId value is 0xCFF0021
, along with this I get some more data, here If I read the data from starting bit 1.1
up to length 16 bits i will get the Wheel based vehicle speed
. How to do that, So for I can understand the reading hexadecimal values but I am not getting values from a particular bit.
import java.util.Scanner;
public class NewClass {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
scan.nextInt(16);
int[] input = new int[10];
for (int i = 0; i < 10; i++) {
//input[i] = scan.nextInt(16);
//System.out.println(input[i]);
}
}
}