SKU:DFR0830 (https://www.dfrobot.com.cn/goods-3278.html)
(https://www.dfrobot.com.cn/goods3278.html)
Introduction
This sensor contains a metal ball that moves along its special internal structure on the effect of
gravitation force so as to make a connection or disconnection. Therefore, it can be used as a
simple tilt switch. With digital input, this sensor can be used with Arduino expansion board to
realize various fun interactive works, meanwhile, safer than mercury tilt switch.
Compared with the traditional steel ball tilt switch that can only achieve single-direction tilt
detection, this product adopts a cylindrical design to allow inclination detection in 360°
directions
directions.
Note: As this product is a switch sensor and cannot measure the tilt angle, it can only
guarantee to output switch when tilted from the horizontal plane to the specified angle. If
you need to accurately measure the tilt angle, it is recommended to use the triple-axis
acceleration sensor.
Specification
Working Voltage: 3.3/5V DC
Interface Type: Digital
Pin Defination: D: Digital
output ; + : Power - : Ground
Steel Ball Switch Closed Tilt
Switch Angle: 45°
Schematic diagram of internal
structure:
Schematic diagram of switch angle:
Connection Diagram
Sample Code
int ledPin = 13;
int switcher = 3;
void setup() {
pinMode(ledPin, OUTPUT);
pinMode(switcher, INPUT);
}
// Connect LED to pin 13
// Connect Tilt sensor to Pin3
// Set digital pin 13 to output mode
// Set digital pin 3 to input mode
void loop() {
if (digitalRead(switcher) == HIGH) //Read sensor value
digitalWrite(ledPin, HIGH);
// Turn on LED when the sensor is tilted
else
digitalWrite(ledPin, LOW);
// Turn off LED when the sensor is not triggered
}
Mind+(Based on Scratch 3.0) Graphical Programming
1. Download and install software. Download address: http://mindplus.cc/en.html
(http://mindplus.cc/en.html) Detailed tutotial:
2. Switch to "Upload" mode. Detailed tutorial:
3. In "Extensions", select "Arduino Uno" in "Board". Detailed tutorial:
4. Program as the picture below.
5. In menu "Connect Device", select "upload to device"
FAQ
For any questions, advice or cool ideas to share, please visit the DFRobot Forum
(https://www.dfrobot.com/forum/).
More Documents
Get Gravity 360 degrees Tilt Sensor (https://www.dfrobot.com/product-203.html) from
DFRobot Store or DFRobot Distributor. (https://www.dfrobot.com/index.php?
route=information/distributorslogo)
g
Turn to the Top
很抱歉,暂时无法提供与“DFR0830”相匹配的价格&库存,您可以联系我们找货
免费人工找货- 国内价格
- 1+31.55005
- 3+26.81874
- 5+26.48336
- 12+25.03402
- 国内价格 香港价格
- 1+34.087161+4.07930
- 3+28.988253+3.46910