Hello,
We have a project where we use the grovepi module with line_finder sensors to follow a line that will be drawn in black.
(ref:Grove - Line Finder - Seeed Wiki)
However, we had multiple problems with the operation of these sensors. We code the project in JAVA and we have already seen the different examples proposed.
Here is the main :
public class MyMain {
public static void main(String[] args) throws IOException, UnsupportedBusNumberException, InterruptedException {
GrovePi grovePi = new GrovePi4J();
while (true) {
System.out.println(grovePi.getDigitalIn(2).get());
Thread.sleep(500);
}
}
}
Our problem is that when we run the program in the raspberry console, it always returns the same value: true.
We think this is due to a threshold problem and after extensive research, no result.
We also noticed that there is no line finder class in Java but it exists in Python
Do you know where this problem comes from? Thanks in advance !
(We are french so we can answer in both french and english)