filmov
tv
How to use Arduino to read Voltage.
![preview_player](https://i.ytimg.com/vi/EcUNLAD1CkA/maxresdefault.jpg)
Показать описание
This video will help you in using Arduino UNO to measure voltage of battery. (less than 5V). The voltage is measured in the units Volt.
Arduino Code:
/*
* Display5vOrless sketch
* prints the voltage on analog pin to the serial port
* Warning - do not connect more than 5 volts directly to an Arduino pin.
*/
const float referenceVolts = 5.0; // the default reference on a 5-volt board
const int batteryPin = 0; // battery is connected to analog pin 0
void setup()
{
}
void loop()
{
int val = analogRead(batteryPin); // read the value from the sensor
float volts = (val / 1023.0) * referenceVolts; // calculate the ratio
delay(500);
}
Arduino Code:
/*
* Display5vOrless sketch
* prints the voltage on analog pin to the serial port
* Warning - do not connect more than 5 volts directly to an Arduino pin.
*/
const float referenceVolts = 5.0; // the default reference on a 5-volt board
const int batteryPin = 0; // battery is connected to analog pin 0
void setup()
{
}
void loop()
{
int val = analogRead(batteryPin); // read the value from the sensor
float volts = (val / 1023.0) * referenceVolts; // calculate the ratio
delay(500);
}
Arduino in 100 Seconds
You can learn Arduino in 15 minutes.
How to Use an Arduino (Lesson #1)
What is Arduino and can I use it for my project? [Beginner Friendly]
Arduino Coding for Beginners | How to Program an Arduino?
Arduino Tutorial: LED Sequential Control- Beginner Project
Arduino Basics 101: Hardware Overview, Fundamental Code Commands
How to Install Arduino Software IDE on Computer / Laptop
Battery charge Calculation? How long will work #project #arduino #electronics #college #engineering
Setup and Program Arduino Uno: Complete Guide
What Is Arduino? What Can You Do With It? Explained
Arduino Tutorial 1: Setting Up and Programming the Arduino for Absolute Beginners
Top 5 Arduino Projects for Beginners. Full tutorial videos in Youtube Channel #arduino
What's the difference? Arduino vs Raspberry Pi
Arduino Blinking LED Tutorial
Arduino Course for Beginners - Open-Source Electronics Platform
What is Arduino? Arduino Projects? Arduino Vs Raspberry Pi?
Control a DC Motor with Arduino (Lesson #16)
Amazing arduino project | Check description to get free money.
How to Program Arduino using Phone
How To Use A Sound Sensor With Arduino
How to Blink an LED with Arduino (Lesson #2)
HC-SR04 Ultrasonic Distance Sensor and Arduino (Lesson #9)
Arduino project how to make a laser electronic alarm, an amazing invention DIY
Комментарии