Specification: Working Voltage : 5V(DC) Static Current: Less than 2mA. Output Signal: Electric frequency signal, high level 5V, low level 0V. Sensor Angle: Not more than 15 degrees. Detection Distance: 2cm-400cm. High Precision: Up to 0.3cm Input Trigger Signal: 10us TTL impulse Echo Signal : output TTL PWL signal โค้ดตัวอย่างการใช้งาน /* HC-SR04 Ping distance sensor: VCC to arduino 5v GND to arduino GND Echo to Arduino pin 7 Trig to Arduino pin 8 This sketch originates from Virtualmix: http://goo.gl/kJ8Gl Has been modified by Winkle ink here: http://winkleink.blogspot.com.au/2012/05/arduino-hc-sr04-ultrasonic-distance.html And modified further by ScottC here: http://arduinobasics.blogspot.com.au/2012/11/arduinobasics-hc-sr04-ultrasonic-sensor.html on 10 Nov 2012. */ #define echoPin 7 // Echo Pin #define trigPin 8 // Trigger Pin #define LEDPin 13 // Onboard LED int maximumRange = 200; // Maximum range needed int minimumRange = 0; // Minimum range n...
Arduino Barometer Project Using BMP180 Nikodem Bartnik Arduino Projects Pressure sensors are widely used in drones, weather stations, smartphones and more. It is important to know how this small piece of technology works. We are going to be using the BPM180 sensor. The name of the module is GY-68. The small device can read, pressure, altitude, and temperature. Let’s build a small device that uses BPM180 to read pressure and altitude and uses an I2C LCD display to show that information (You can as well choose to display it on the serial port). Here are the components we need: 1 x Arduino Uno Board 1 x BMP180 pressure sensor 1 x I2C LCD Jumpers wires As usual, we need to do the connection before uploading the sketch into the board. Because both the LCD and the pressure sensor use the I2C, we have to connect the pins SDA and SCL to the analog pins 4 and 5. Some barometers have a Vin pin and some a 3V3 pin. If yours has a Vin, it should...
ความคิดเห็น
แสดงความคิดเห็น