Hc Sr04 Ultrasonic Distance Measurement With 7Segment Display
Rs. 179.00 Rs. 215.00
- Product Code: SEN-ULTRA
- SKU -
- Availability: In Stock
- Price in reward points: 3
- For Bulk Order 9962060070
Quick support on WhatsApp (+919962060070) only between morning 11am-4pm, no call will be answered
SPECIFICATIONS: | |
Model | STM8S103 |
Input Voltage (volt) | 5 |
Unit of Display value | cm |
Valid Measurement Distance (cm) | 3 – 400 |
Shipment Weight | 0.083 kg |
Shipment Dimensions | 8 × 7 × 4 cm |
OVERVIEW:
-Onboard STM8S103 high-performance microprocessor
-With digital tube display
-Valid Measurement Distance: 3-400cm
-Display Unit: cm
-Maximum Input Voltage: 5VDC
-2.54mm White Socket: 5V power interface.
PACKAGE INCLUDES:
1 PCS x Hc Sr04 Ultrasonic Distance Measurement With 7Segment Display
//SOURCE CODE TAKEN FORM BELOW LINK
//https://protosupplies.com/product/hc-sr04-ultrasonic-distance-measurement-control-module/
/* Simple program to communicate with the HC-SR04 Distance Measurement
Control Module
Uses hardware serial to talk to the host computer and software serial for
communication with the HC-SR04 Distance Measurement Control Module
Connections
Arduino 5V to module VCC
Arduino GND to module GND
Arduino D9 to module RX
Arduino D8 to module TX
When data is received from the HC-SR04 Distance measurement Module, it is
forwarded to the computer over the USB port where it can be displayed in the
Serial Monitor window.
Data uses the format 'D:XXX' where XXX is distance in centimeters
Uses Softserial.h library
*/
#include <SoftwareSerial.h>
SoftwareSerial SoftSerial(8, 9); // RX | TX pins. Can be reassigned if needed
const long BAUDRATE = 9600; // Baud rate of the HC-SR04 control module
char c = ' '; // Character from HC-SR04 control module
//===============================================================================
// Initialization
//===============================================================================
void setup()
{
SoftSerial.begin(BAUDRATE); // Init soft serial object
Serial.begin(9600); // Init hardware serial
Serial.println("Test started");
}
//===============================================================================
// Main
//===============================================================================
void loop()
{
// Read from the HC-SR04 Control module and send to the Serial Monitor
if (SoftSerial.available())
{
c = SoftSerial.read();
Serial.write(c);
}
}
15 days