- Joined
- Oct 18, 2015
- Posts
- 9,230
- Solutions
- 1,056
- Reaction
- 27,127
- Points
- 6,525
C++:
const int trigPin = 3;
const int echoPin = 2;
void setup() {
Serial.begin(9600);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
}
void loop() {
long duration, cm, inches, feet;
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
cm = duration / 29 / 2;
inches = cm / 2.54;
feet = inches / 12;
Serial.print("Height: ");
Serial.print(cm);
Serial.print(" cm, ");
Serial.print(inches);
Serial.print(" in, ");
Serial.print(feet);
Serial.println(" ft");
delay(1000);
}
sensors and materials used:
• LM35 to measure the temperature of the person
• HC-SR04 ultrasonic sensor to measure the height of a person
• Pulse Sensor to measure pulse n respiratory rate
• 20x4 LCD
• Mini thermal receipt printer
• Arduino uno
Overview:
So our product has up, down, right, left buttons that allow the user to navigate which sensor he wants to use, he can also choose if cm, inch or ft. if he wants to use for the height unit.
He also has a choice whether to print the recorded value using the mini thermal receipt printer or not. the pulse sensor can not only measure the pulse but also the respiratory rate.
Last edited: