Skip to content
Osief
Osief
  • Home
  • About Us
  • Contact Us
Osief
Osief
  • (360 Radar)using (Arduino uno) Ultrasonic sensor(HC-SR04) & servo motor
  • About Us
  • Connection of (servo motor)& control it with an (Arduino Uno),in 3 different angle
  • Contact Us
  • Count from 0 to 9 on a common cathode 7-segment display, using Arduino uno
  • Count from 0 to 9 on a common cathode 7-segment display,using Arduino uno 
  • Create a “watch” or clock on an LCD screen connected to an Arduino Uno with an I2C converter
  • Display (Arabic text) on an (LCD screen) connected to an Arduino Uno using an I2C converter
  • display moving text from left to right on an LCD screen connected to an Arduino Uno with an I2C converter
  • Display text with a fade-out effect on an LCD screen connected to an Arduino Uno using an I2C converter,
  • Display(any Pictures)on(0.96″ OLED)connected to(Arduino Uno)using I2C communication
  • Distance measurement of an (object) using an HC-SR04 (ultrasonic sensor) with an Arduino Uno
  • Electrical & Electronic
  • Home
  • How to change Name and password of Bluetooth Module
  • How to display any(moving emoji)on (0.96 inch I2C OLED display)using Arduino uno
  • Measure (Voltage) using (Arduino uno) only !!
  • One Master / one slave using I2C Protocol control six  LED arduino uno
  • Project for (Restricted area).To measure the distance using an Arduino Uno, HC-SR04 ultrasonic sensor, and display the results on an I2C-connected LCD with specific conditions for LED indications and text display
  • Scrolling text for(0.96″ OLED)connected to(Arduino Uno)using I2C communication
  • secondary
  • test gif
  • To control (3LED) ON/OFF using Remote control & Arduino uno, IR receiver
  • To control (LED) ON/OFF using (WiFi Module EPS 8266)
  • To control (three AC Bulb) using an Arduino Uno, (Relay Module) & (Bluetooth module)
  • To count from 0 to 1000 very fast and display the count on an LCD screen connected to an Arduino Uno via an I2C converter
  • To create a radar-like system using an Arduino Uno and a servo motor controlled by the HC-SR04 ultrasonic sensor
  • To display “anything” on an (LCD screen) connected to an (Arduino Uno) using an (I2C converter)
  • To display (1234) on 4-digit 7-segment display using Arduino uno 
  • To display text that slides into place on an LCD screen connected to an Arduino Uno using an I2C converter
  • To display text with a (fade-in) effect on an (LCD screen) connected to an Arduino Uno using an I2C converter
  • To measure the distance of an object using an HC-SR04 ultrasonic sensor and display the results on an LCD screen connected via an I2C converter
  • To write directly from a (keyboard) to an LCD screen connected to an Arduino Uno via an I2C converter
  • youtube Channel

كيفية قياس

(Voltage)

باستخدام

(Arduino Uno)

فقط!!

Measure (Voltage) using (Arduino uno) only !!

code:

const float referenceVolts = 5.0; // the default reference on a 5-volt

const int batteryPin = A0; // battery is connected to analog pin 0
void setup()
{
Serial.begin(9600);
}

// ██████  ███████ ██ ███████ ███████     ██████  ██████  ███    ███ 
//██  ████ ██      ██ ██      ██         ██      ██    ██ ████  ████ 
//██ ██ ██ ███████ ██ █████   █████      ██      ██    ██ ██ ████ ██ 
//████  ██      ██ ██ ██      ██         ██      ██    ██ ██  ██  ██ 
// ██████  ███████ ██ ███████ ██      ██  ██████  ██████  ██      ██ 

void loop()
{
int val = analogRead(batteryPin); // read the value from the sensor
float volts = (val / 1023.0) * referenceVolts; // calculate the ratio

Serial.println(volts); // print the value in volts
}

// ██████╗ ███████╗██╗███████╗███████╗    ██████╗ ██████╗ ███╗   ███╗
//██╔═████╗██╔════╝██║██╔════╝██╔════╝   ██╔════╝██╔═══██╗████╗ ████║
//██║██╔██║███████╗██║█████╗  █████╗     ██║     ██║   ██║██╔████╔██║
//████╔╝██║╚════██║██║██╔══╝  ██╔══╝     ██║     ██║   ██║██║╚██╔╝██║
//╚██████╔╝███████║██║███████╗██║  ██╗   ╚██████╗╚██████╔╝██║ ╚═╝ ██║
// ╚═════╝ ╚══════╝╚═╝╚══════╝╚═╝  ╚═╝   ╚═════╝ ╚═════╝ ╚═╝      ╚═╝

 

referance: Arduino_Cookbook_3rd_Edition_-_Nicholas_Robert_Weldin

Copyright © 2025 Osief | Powered by Astra WordPress Theme