Arduino Sensor Reading and Display Tutorial

lab 2 arduino sensors lab 2 arduino sensors l.w
1 / 6
Embed
Share

Learn how to read sensor values, display data on an LCD screen, and map temperature readings using Arduino in this comprehensive tutorial. Explore connections, programming, and sensor calibration for temperature readings in Celsius and Fahrenheit.

  • Arduino
  • Sensor Reading
  • LCD Display
  • Temperature Sensor
  • Tutorial

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Lab 2: Arduino Sensors Lab 2: Arduino Sensors Topics: Arduino Sensor Reading, Display Date: Sept 2, 2016

  2. References ( References (s study these) tudy these) https://www.arduino.cc/en/Tutorial/HelloWorld http://www.allaboutcircuits.com/projects/interface-an-lcd-with-an-arduino/ https://www.arduino.cc/en/tutorial/potentiometer https://learn.sparkfun.com/tutorials/sik-experiment-guide-for-arduino--- v32/experiment-7-reading-a-temperature-sensor 2

  3. LCD Display LCD Display HW Setup It has 16 pins: 12 of them need to be connected to {Vcc, GND, potentiometer, and Arduino pins} HW Setup 1 2 3 4 5 VSS/ GND VCC/ +5 V0/ POT RS/ Pin 12 RW/ GND 6 7-10 11-14 15 16 E/ Pin11 D4-D7/ Pin2-Pin5 LED+/ Res+VCC LED-/ GND Potentiometer Resistor 3

  4. LCD Display LCD Display Programming Programming Include the library and initialize. lcd.begin(COLS, ROWS); lcd.setCursor(COL, ROW); lcd.print( string ); lcd.print(FP_Num, 4); #include <LiquidCrystal.h> // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); void setup() { // set up number of columns and rows: lcd.begin(16, 2); // Print a message to the LCD. lcd.print("hello, world!"); } void loop() { // set the cursor to column 0, line 1 lcd.setCursor(0, 1); // print the number of sec since reset: lcd.print(millis() / 1000); } 4

  5. Temperature Sensor Temperature Sensor It has 3 pins. The middle one gives you sensor value [0, 1023] How do you map the value to voltage? Temp (C) = (Voltage 0.5) * 100 How do you get Temp (F)? val = analogRead(AnalogPin); 5

  6. Lab 2 Lab 2 Read and Display Temperature Read and Display Temperature 6

More Related Content