Good night,
Going on with my adventures with Arduino and sensors, today I decided to play with Ultrasonic sensor HC-SR04 to measure distance.
HC-SR04 is pretty easy to work with, it has 4 pins, VCC to energy, Trig to start a measurement, Echo to get the distance, and GND to ground.
It has a library to get it working, it is called Ultrasonic. The only problem that I had was the Library is out of date, it still uses WProgram.h but Arduino 1.0.1 uses Arduino.h, so I updated it. (You can get on the end of the post).
The library must be included on your dir “arduino-1.0.1/libraries” and you must restart your IDE.
Sensor VCC connects to Arduino +5V pin
Sensor Trig connects to Arduino PIN 12
Sensor Echo connects to Arduino PIN 13
Sensor GND connnects to Arduino GND PIN
You can configure it on trig and echo variables.
[code lang=”c”]
#include “Ultrasonic.h”
int trig = 12;
int echo = 13;
Ultrasonic ultrasonic(trig,echo);
void setup() {
Serial.begin(9600);
}
void loop()
{
Serial.print(“Distance CM:”);
Serial.println(ultrasonic.Ranging(CM));
Serial.print(“Distance INC:”);
Serial.println(ultrasonic.Ranging(INC));
delay(100);
}
[/code]
Referências:
HC-SR04 DataSheet
Biblioteca Ultrasonic atualizada para Arduino 1.0.1
Left me wanting to read more rather than feeling burned out, that is a good sign, and a look at forwardintentions confirmed there is plenty more here to explore, the kind of writing that builds appetite rather than killing it which is a rare quality on the modern open internet today across most categories of content.
Now understanding why someone recommended this site to me a while back, and a stop at forwardmomentumlogic explained the recommendation, sometimes recommendations make sense only after experience and this site has finally clicked into place as the kind of resource I now understand was being recommended for sound editorial reasons by my friend.
Excellent post, balanced and well organised without showing off, and a stop at growthmoveswithprecision continued in that same vein, this site has clearly figured out the formula for content that works for readers rather than for search engine ranking signals which is harder than it sounds today and worth real recognition from anyone.
Felt this in a way I cannot quite explain, the topic just hit different here, and a stop at actionturnsvision continued in that vein, sometimes you find a site whose perspective lines up with how you have been thinking and reading their work feels like a small relief which I appreciated more than I expected.
يفتح 888starz أمام لاعبي مصر بوابة رسمية واحدة تجمع آلاف الألعاب وعشرات الرياضات.
يضم القسم آلاف عناوين السلوت من استوديوهات موثوقة.
يمنح الرهان الحي احتمالات محدّثة لحظيًا مع بث ومتابعة مباشرة.
ولا تقتصر العروض على الترحيب بل تشمل كاش باك ورهانات مجانية وبطولات.
يوفر 888starz الدفع عبر Visa و Mastercard و Skrill والكريبتو المتنوع بحد إيداع منخفض.
888starz https://888starzs2.com/
888starz 888starz
يوفر 888starz.bet للمستخدم المصري تجربة متكاملة تضم الكازينو والرهانات الرياضية دون تعدد الحسابات.
يفتح الكازينو الحي أكثر من 250 طاولة بموزعين حقيقيين طوال اليوم.
تتوفر أسواق على البطولات الكبرى إلى جانب الدوري المصري.
يمنح 888starz أول إيداع في الكازينو ما يصل إلى 1500 يورو و150 دورة مجانية.
يتم إنشاء حساب جديد في دقائق معدودة على المنصة الرسمية.
Closed the tab with a small sense of finality rather than the usual rushed exit, and a stop at clearcoast produced the same considered closing, when reading ends with deliberate satisfaction rather than impatient skip you know the time was well spent and this site is producing those satisfying endings consistently across what I read.