Created
August 18, 2021 05:42
-
-
Save MacoChave/d3e80c32efa7cffce32a9692911761d1 to your computer and use it in GitHub Desktop.
Arduino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//#define Hall_Sensor A0 | |
#define Hall_Sensor_D 2 | |
int Val2 = 0; | |
void setup() { | |
// put your setup code here, to run once: | |
Serial.begin(9600); | |
pinMode(Hall_Sensor_D, INPUT); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
//Val1 = analogRead(Hall_Sensor); | |
//Serial.print(Val1); | |
Val2 = digitalRead(Hall_Sensor_D); | |
if (Val2 == 1) | |
Serial.println("Flecha"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment