DFRobot 的 DFR0054 规格书

AnalogRotationSensorV1(SKU:DFR0054)
FromRobotWiki
Contents
1Introduction
2Specification
3PinDefinition
4ConnectionDiagram
5SampleCode
Introduction
AnalogRotationSensorV1(SKU:DFR0054)
The DFRobot Rotation Sensor V1 is arduino compatible and can be rotated upto 300-degree. It is
based on the potentiometer. With the Arduino sensor expansion board, in combination, it can be
very easy to achieve position-dependent interaction with the rotating effect or produce MIDI
instrument.
Specification
Interfacetype:Analog
300degreerotationsensor
PinDefinition
The definition of gas sensor pin is
1. SignalOutput
2. GND
3. Power
AnalogSensorPinDefinition
',1 £99501
ConnectionDiagram
Analogsensorconnectiondiagram
SampleCode
// # Editor : Lauren from DFRobot
// # Date : 30.12.2011
// #
// # Editor : Lauren from DFRobot
// # Date : 17.01.2012
// # Product name: Rotation Sensor v1/v2 or Analog Slide Position Sensor
// # Product SKU : DFR0054/DFR0058/DFR0053
// # Version : 1.0
// # Description:
// # the sample to drive some analog sensors
// # Connection:
// # Signal output pin -> Analog pin 0
// #
void setup()
{
Serial.begin(9600); //Set serial baud rate to 9600 bps
}
void loop()
{
int val;
val=analogRead(0); //Read slider value from analog 0
Serial.println(val,DEC);//Print the value to serial port
delay(100);
}
Powered By DFRobot © 2008-2017