Chirila Radu
Published © GPL3+

Email Home Automation

With this project, I tried to make my home "smart," but took a different route, completely avoiding voice commands.

IntermediateFull instructions provided5 hours6,973
Email Home Automation

Things used in this project

Story

Read more

Schematics

Schematic

This is the general wiring schematic for my project

Code

Arduino Basic Code

Arduino
This is the code that converts the temperature to Celsius and sends it to the raspberry pi through serial
void setup() {
  Serial.begin(9600);//initialize serial communication on 9600 baud rate
}

void loop() {
  int r=analogRead(A0);//read sensor value through the ADC
  r*=5;
  float v=r/1024.0;
  float celsius=(v-0.5)*100;//convert to celsius (algorithm taken from datasheet)
  Serial.println(celsius);//send celsius value through serial
}

Credits

Chirila Radu

Chirila Radu

2 projects • 3 followers

Comments