Your browser doesn't support the features requi#EC1C24 by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

arduino two hall magnet sensors base sketch


#define Input_Left 2
#define Input_Right 3

void setup() {
  pinMode(Input_Left, INPUT);                    // Eingangspin auf Eingang stellen
  pinMode(Input_Right, INPUT);                    // Eingangspin auf Eingang stellen

  
  Serial.begin(9600);

  attachInterrupt(0, detectLeft, FALLING);
  attachInterrupt(1, detectRight, FALLING);

  Serial.println("Hall-Effekt-Sensor Test");
}


void loop() {

}



void detectLeft() {
  Serial.println("Left Magnet recognized");
}

void detectRight() {
  Serial.println("Right Magnet recognized");
}
hello world

Use a spacebar or arrow keys to navigate