[an error occurred while processing this directive]
[an error occurred while processing this directive]
Содержание > Arduino > Набор для Arduino "37 SENSOR" > 31. Аnalog Hall magnetic sensor module


Описание


Модуль содержит датчик Холла - SS49E,



int sensorPin = A5; // select the input pin
int ledPin = 13; // select the pin for the LED
int sensorValue = 0; // variable to store the value coming from the
sensor
void setup () {
pinMode (ledPin, OUTPUT);
Serial.begin (9600);
}
void loop () {
sensorValue = analogRead (sensorPin);
digitalWrite (ledPin, HIGH);
delay (sensorValue);
digitalWrite (ledPin, LOW);
delay (sensorValue);
Serial.println (sensorValue, DEC);
}





Вопросы, обсуждения, дополнения





Copyright © R9AL 2018 Все права защищены
Рейтинг@Mail.ru