Self-written a small program, to 51 of the friends to use, measured also OK, no problem, but a few meters above is not accurate, mainly the module is relatively inexpensive, when practiced hand used. The comments are also clear.
/* Ultrasonic ranging procedures, the use of 51 MCU external interrupt, if sometimes found not working, we recommend the direct use of the DuPont line connection pin */#include
;
}
Extrn CODE (COUNT)
ORG 0000H
JMP MAIN
ORG 0003H
LJMP EXT0
Main:mov Tmod, #01H; set to timer and 1 for mode
CLR P3.1; In order to stabilize the system, the P3.1 hardware must be grounded and the software must be zeroed
Setb P3.2
SETB EA; Open Total interrupt
CLR IT0; Set to level trigger, low level triggers external 0 interrupt MOV SP, #60H
Start:mov R6, #0; Enter an interrupt identification
MOV R7, #4
MOV 40H, #00H; hold the number of centimeter bits
MOV 41H, #00H; number of bits stored
M
Features of SUN-A Type Intelligent external stick Ultrasonic Liquid Level SwitchInstallation outside the tank, no holes, no fire, no damage to the tank, no suspension of installation, no suspension of maintenance;Non-plug-in measurement is independent of the pressure, temperature, specific gravity of the media, and whether the media is corrosive. tNo interference with media in the tank or device, no pollution, No leakage or corrosion, except for the p
() - whileGpio.input (echo_pin): + Pass At2 =time.time () at return(T2-T1) *340/2 - - Try: - whileTrue: - Print 'distance:%0.2f M'%checkdist () -Time.sleep (3) in exceptKeyboardinterrupt: -Gpio.cleanup ()found that the catch of the exception is for Crtl+c trigger, before my several modules if the output of the CTRL + C or will continue to output, I can only write a script to close the output of the corresponding pin, with this abnormal capture, it is more convenie
Zhang happy Windows 10 IoT Development Notes: HC-SR04 Ultrasonic Ranging module, iothc-sr04
HC-SR04 with IO-triggered ranging. The following describes how to use Windows 10 IoT Core.
The project runs on Raspberry Pi 2/3 and uses C # for encoding.
1. Prepare
HC-SR04 X 1
Raspberry Pi 2/3 × 1
Dubang line with a public head × 4
2. wired
Vcc-5 V
Gnd-GND
Trig-GPIO 17-Pin 11
Echo-GPIO 27-Pin 13
3. Code
GitHub: https://github.com/ZhangGaoxing/wind
1. Goal/Purpose
I do mobile robot, ultrasonic or infrared ranging alarm is sure, a small experiment, the purpose is to ultrasonic ranging, OLED display the distance from the front obstacle, distance over the hour, buzzer alarm, and the smaller the alarm frequency of the more rapid beep.
2. Hardware
(1) stm32f1
(2) Ultrasonic Hc-sro4
(3) OLED12864
(4) BEEP
3. Hard
Principle of ultrasonic testing
Program flow chart of ultrasonic distance measurement
The procedure is as follows:
Ultrasonic module Program//ultrasonic Module Program//trig = p2^0//echo = p3^2 #include
This article mainly introduces the use of UART and PC communication to achieve msp430g2553 single chip ultrasonic Ranging example, need friends can refer to the next
It is suitable for msp430g2553 MCU to use the HC-SR04 ultrasonic ranging module and communicates with PC using UART.
The code is as follows:
#include
The last time a long current_time;//was measured
/*mypro*/
#define LED_1 BIT0
#define S
Characteristics of Sun-a Intelligent External-mount ultrasonic liquid level switch
Can be installed outside the tank, do not open the hole, do not fire, do not damage the tank, do not stop the installation, not discontinued maintenance;
Non-insertion measurement has no relation with pressure, temperature, specific gravity and corrosion of the medium, and it has wide fitting surface. t
External labeling measurement, no interference, no pollution, no le
The use of soft tones in Web pages is more than just a recent trend, a designer's use of many years of skill to create impactful visuals.When you hear the word "soft", you may think of light pink, light blue, and yellowish color, but this color is far more than these colors. Softness does not necessarily feel like a newborn. These tones can also be quite distinct in some appropriate way, in conjunction with
The use of soft tones in Web pages is not just a recent trend, it is a technique that designers have used for years to create an impact visual effect.
When you hear the word "soft," you may think of light pink, pale blue, and yellowish color, but this color is far more than that. Softness does not necessarily feel like a newborn. These tones can also be quite distinct, in some appropriate way, with other e
Strategy
The 2005 ring tone Market in China will enter a mature period, the conservative estimate will be 20% of the telephone users will become the ringtone users, this part of the user will be in the equipment manufacturing, content and service areas to generate tens of billions of of the market demand. "Seven tones" is China Telecom's ring tone business of the unified brand, the business has a mature market environment and clear profit model, to im
control slider, the beginner may accidentally because of the setting of errors resulting in high light exposure or the loss of dark details of the problem, using a preset is a simple and safe choice. In addition, we will also tell you how to use non-destructive editing methods for the screen to highlight and deepen the processing, so that the details become more prominent.
Separate tones
Black and white photographic works have enough vi
Use CFStringTransform to convert Chinese characters to PinYin (excluding tones) and cfstringtransform
Usage:
NSMutableString * source = [sourceString mutableCopy];
CFStringTransform (_ bridge CFMutableStringRef) source, NULL, kCFStringTransformMandarinLatin, NO );
CFStringTransform (_ bridge CFMutableStringRef) source, NULL, kCFStringTransformStripDiacritics, NO );
Return source;
In this method, kCFStringTransformMandarinLatin converts Chinese charact
ADSL divides the high-frequency part of a telephone line into many tones. Each tone carries a certain bit bandwidth, and the total bandwidth that all tones can carry is the maximum bandwidth of this ADSL line. Each tone has a certain background noise. After the bandwidth occupied by this background noise is removed, the remaining part can transmit data. Therefore, the maximum bandwidth that the tone can car
Looked down patiently, elder brother is realized, and all the details will give quite rich ha.Ubuntu:ubuntu 14.04 LTSOpenSSHWINDOW10 (64-bit): secureCRT8.0See online as the same as the cattle said git+ssh use, build their own git server, so hey, so the action up, first to win10 installed Git, and then installed on Ubuntu SSH (This step is very simple, do not say, there is a general tutorial, I am only write as the same cattle do notAttention to the details, for your friends to reference! Then do
Production ideas: Using the Channel mixer is the color principle of the channel to create a simple and beautiful green tones
Effect comparison
1. Open the picture first. This is a good picture, the film itself is also very good feeling is too common. I'm going to change the overall tone and make her feel different.
2. Click the "Create Fill or Adjust Layer button" below the layers panel to select the Channel mixer option. In
Have a lot of friends reaction, do not know how to input phonetic tones in Word, this tutorial is to solve this problem for everyone. Have the need of friends to learn to learn it!
There are two ways of doing this.
Method One:
Use the feature that inserts special characters in Word to enter the tones. After inputting good pinyin, for example: White, Bai, to add two on a, we directly select a, open "inser
When it comes to monochrome, it is sometimes easy to think that it is only black and white or "gray", black and white actually means that different shades and tones of a color can be used.In this collection, we have collected some very interesting usage, webpage design with single tones.You will find that because of the color usage, the design is usually clean and cohesive.
Www. mikesmart. co. uk
Www.magazine1.suitupordie.com
Www.2012.newadve
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.