Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pm:prj2022:agmocanu:liedetector [2022/06/01 19:51]
teodora.nedelcu [Hardware Design]
pm:prj2022:agmocanu:liedetector [2022/06/02 10:51] (current)
teodora.nedelcu [Software Design]
Line 11: Line 11:
  
  
-We use the button to start the measuring of the pulse and if its elevated the person lied. A message will appear on the display with the result. ​+We start the measuring of the pulse and if its elevated the person lied. A message will appear on the display with the result. ​
    
 +{{:​pm:​prj2022:​agmocanu:​nedelcu.jpeg?​800|}}
 ===== Hardware Design ===== ===== Hardware Design =====
  
Line 22: Line 22:
   * Cables   * Cables
  
 +{{:​pm:​prj2022:​agmocanu:​lala.jpeg?​600|}}
 ===== Software Design ===== ===== Software Design =====
  
 +The code displays on LCD the amount of beats per minute calculated by the pulse sensor.
 +I used the following libraries:
  
 +1. For the LCD display
 +       ​LiquidCrystal_I2C.h
 +       ​Wire.h  ​
 +       
 +2. For the pulse sensor
 +       ​PulseSensorPlayground.h
 +       
 +       
 +  ​
 + Code:
  
 +#define USE_ARDUINO_INTERRUPTS true 
 +#include <​PulseSensorPlayground.h> ​
 +#include <​LiquidCrystal_I2C.h>​
 +#include <​Wire.h>  ​
  
-===== Rezultate Obţinute =====+const int PulseWire ​0;  
 +int Threshold ​550;  
 +                      
 +LiquidCrystal_I2C lcd(0x27,​16,​2); ​  
 +                               
 +PulseSensorPlayground pulseSensor; ​
  
 +void setup() {   
 +  lcd.init(); ​                   ​
 +  Serial.begin(9600); ​
 +  pulseSensor.analogInput(PulseWire); ​  
 +  pulseSensor.setThreshold(Threshold); ​  
 +    if (pulseSensor.begin()) {
 +  Serial.println("​We created a pulseSensor Object !"​); ​
 +  }
 + 
 + }
 +
 +void loop() {
 +  int myBPM = pulseSensor.getBeatsPerMinute(); ​
 +  if (pulseSensor.sawStartOfBeat()) { 
 +    Serial.println("​♥ ​ A HeartBeat Happened ! ");
 +    lcd.backlight();​
 +    lcd.setCursor(0,​ 0);
 +  lcd.print("​BPM"​);​
 +  lcd.setCursor(0,​ 1);
 +  if (myBPM < 100){
 +    lcd.print("​ ");
 +    lcd.print(myBPM);​
 +    lcd.setCursor(4,​1);​
 +    lcd.print(" ​  "​);​
 +  }else{
 +    lcd.print(myBPM);​
 +    lcd.setCursor(4,​1);​
 +    lcd.print("​Lie"​);​
 +    ​
 +  }
 +  Serial.println(myBPM);​
 +    }
 +  delay(20); ​
 + 
 + }
 +  ​
 +
 +
 +===== Rezultate Obţinute =====
  
 +{{:​pm:​prj2022:​agmocanu:​LIEDETECT.jpeg?​400|}} ​     {{:​pm:​prj2022:​agmocanu:​LIEDETECT2.jpeg?​500|}}
  
 ===== Concluzii ===== ===== Concluzii =====
 +This project taught me how to use Arduino, LCD display and a pulse sensor. I think it would be fun to try and build different useful things this way.
  
-===== Download ===== 
  
  
-===== Jurnal ===== 
  
  
Line 43: Line 103:
 ===== Bibliografie/​Resurse ===== ===== Bibliografie/​Resurse =====
  
 +https://​how2electronics.com/​
 +
 +https://​arduino.cc/​
  
 +http://​robojax.com/​node/​921
  
 <​html><​a class="​media mediafile mf_pdf"​ href="?​do=export_pdf">​Export to PDF</​a></​html>​ <​html><​a class="​media mediafile mf_pdf"​ href="?​do=export_pdf">​Export to PDF</​a></​html>​
pm/prj2022/agmocanu/liedetector.1654102318.txt.gz · Last modified: 2022/06/01 19:51 by teodora.nedelcu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0