Melden Sie sich jetzt für den Newsletter an und profitieren Sie von Aktionen, Gutscheinen & Verlosungen.




Analog Hall Sensor

Analog Hall Sensor - Miscellaneous
Brand: Various
Product Code: AC-1130
Availability: In Stock
Price: 3,75€
Incl. 0,60€ VAT excl. shipping costs

Analog Hall Sensor

This sensor measure a magnetic field. If this is presence it wil put the signal line to high. In this example the led on the arduino (pin 13) will be turned on when signal of sensor is high. Also on the module itself is a led that will be on when signal is high.

Code Sample:

int Led = 13 ; // define LED Interfaceint SENSOR = 10 ; // define the Hall magnetic sensor interfaceint val ; // define numeric variables valvoid setup (){
pinMode (Led, OUTPUT) ; // define LED as output interface
pinMode (SENSOR, INPUT) ; // define the Hall magnetic sensor output interface}void loop (){
val = digitalRead (SENSOR) ; // read digital interface is assigned a value of 3 valif (val == HIGH) // When the shock sensor detects a signal, LED lights{
digitalWrite (Led, HIGH);}{
digitalWrite (Led, LOW);}}

Write a review

Your Name:

Your Review:Note: HTML is not translated!

Rating: Bad           Good

Enter the code in the box below:

Live Help