”Arduino Home Automation Controller

Arduino Home Automation Controller

Codepur
Aug 26, 2018
  • 1.5 MB

    ขนาดไฟล์

  • Android 4.4+

    Android OS

เกี่ยวกับ Arduino Home Automation Controller

Used as a Bluetooth remote control for Arduino specialized for Home Automation.

Used as a Bluetooth remote control for Arduino.

Code for Arduino;

#include

const int sensorIn = A0;

int mVperAmp = 66; // use 100 for 20A Module and 66 for 30A Module

int port1=2,port2=3,port3=4,port4=5,port5=6,port6=7,port7=8,port8=9;

double Voltage = 0;

double VRMS = 0;

double AmpsRMS = 0;

void setup(){

Serial.begin(9600);

pinMode(port1, OUTPUT);

pinMode(port2, OUTPUT);

pinMode(port3, OUTPUT);

pinMode(port4, OUTPUT);

pinMode(port5, OUTPUT);

pinMode(port6, OUTPUT);

pinMode(port7, OUTPUT);

pinMode(port8, OUTPUT);

}

void loop(){

while (Serial.available() > 0) {

int inByte = Serial.read();

switch (inByte) {

case 'a':

digitalWrite(port1,HIGH);

break;

case 'b':

digitalWrite(port1,LOW);

break;

case 'c':

digitalWrite(port2,HIGH);

break;

case 'd':

digitalWrite(port2,LOW);

break;

case 'e':

digitalWrite(port3,HIGH);

break;

case 'f':

digitalWrite(port3,LOW);

break;

case 'g':

digitalWrite(port4,HIGH);

break;

case 'h':

digitalWrite(port4,LOW);

break;

case 'i':

digitalWrite(port5,HIGH);

break;

case 'j':

digitalWrite(port5,LOW);

break;

case 'k':

digitalWrite(port6,HIGH);

break;

case 'l':

digitalWrite(port6,LOW);

break;

case 'm':

digitalWrite(port7,HIGH);

break;

case 'n':

digitalWrite(port7,LOW);

break;

case 'o':

digitalWrite(port8,HIGH);

break;

case 'p':

digitalWrite(port8,LOW);

break;

}

}

Voltage = getVPP();

VRMS = (Voltage/2.0) *0.707;

AmpsRMS = (VRMS * 1000)/mVperAmp;

Serial.print("\n");

}

float getVPP()

{

float result;

int readValue; //value read from the sensor

int maxValue = 0; // store max value here

int minValue = 1024; // store min value here

uint32_t start_time = millis();

while((millis()-start_time) < 1000) //sample for 1 Sec

{

readValue = analogRead(sensorIn);

// see if you have a new maxValue

if (readValue > maxValue)

{

/*record the maximum sensor value*/

maxValue = readValue;

}

if (readValue < minValue)

{

/*record the maximum sensor value*/

minValue = readValue;

}

}

// Subtract min from max

result = ((maxValue - minValue) * 5.0)/1024.0;

return result;

}

แสดงเพิ่มเติม

What's new in the latest 1.0

Last updated on 2018-08-26
Bluetooth terminal to controll Arduino for Home Automation
แสดงเพิ่มเติม

วิดีโอและภาพหน้าจอ

  • Arduino Home Automation Controller โปสเตอร์
  • Arduino Home Automation Controller ภาพหน้าจอ 1
  • Arduino Home Automation Controller ภาพหน้าจอ 2
  • Arduino Home Automation Controller ภาพหน้าจอ 3
  • Arduino Home Automation Controller ภาพหน้าจอ 4
  • Arduino Home Automation Controller ภาพหน้าจอ 5

Arduino Home Automation Controller รุ่นเก่า

APKPure ไอคอน

การดาวน์โหลดที่รวดเร็วและปลอดภัยเป็นพิเศษผ่านแอป APKPure

คลิกเพียงครั้งเดียวเพื่อติดตั้งไฟล์ XAPK/APK บน Android!

ดาวน์โหลด APKPure
thank icon
เราใช้คุกกี้และเทคโนโลยีอื่น ๆ บนเว็บไซต์นี้ เพื่อปรับปรุงประสบการณ์การใช้งานของคุณ
การคลิกลิงก์ใด ๆ ในหน้านี้แสดงว่าคุณยินยอมในส่วนของ นโยบายความเป็นส่วนตัว และ นโยบายคุกกี้ ของเรา
เรียนรู้เพิ่มเติม