So I'm playing with a hall effect sensor and when I run this code I get around 206 reults back.
void loop() {
time = 0;
while(time < 1000) {
Serial.print(analogRead(hallPin0));
Serial.println();
time = millis();
}
delay(100000);
}
That means I have a reading of the hall effect sensor once every 5ms... That is way too low for my future project.
Or does the hall effect sensor has a lot more feedback, but I interrupt it with my Serial.print request???
I want to have a check around every 1ms so I can compare a distance very accurate in combination with time.
void setup() {
Serial.begin(9600); // open the serial port at 9600 bps
pinMode(hallPin0, INPUT);
pinMode(hallPin1, INPUT);
pinMode(hallPin2, INPUT);
pinMode(hallPin3, INPUT);
}
If I use higher baudrate I get weird characters in the Monitor I can't read