分类 Smart@Home 下的文章

Arduino Nano + L298N

//源文件class Motor{public:  Motor(int in1, int in2, int in3, int in4, int ena, int enb)  {    _pin1 = in1;    _pin2 = in2;    _pin3 = in3;    _pin4 = in4;    _pina = ena;    _pinb = enb; &...

Continue Reading...

Air Quality Monitoring

原文地址:http://www.howmuchsnow.com/arduino/airquality/ 主要注意粉尘计算公式 Update: 2014/01/28 val = (dustVal*0.0049*0.172-0.0999)*2000; 这个颗粒物计算公式比较准确 /* Interface to Sharp GP2Y1010AU0F Particle Sensor Program by Christopher Nafis Written April 2012 http://www.sparkfun.com/datasheets/Sensors/gp...

Continue Reading...

libCUrl封装

#ifndef BASE_CURL_H#define BASE_CURL_H#include <iostream>#include <string.h>#include "curl/curl.h"#include <json/json.h>using namespace std;class BaseCURL{public:    BaseCURL()    : m_header(NULL)    , m_curl(NULL)&nbs...

Continue Reading...

ArduinoServer

Arduino MEGA2560传感器: DHT11,GP2Y10(Sharp)网络: HLK-M03(透明串口,连接Arduino的Com3)其他:VoltageChecker电压检测/*Sharp pin 1 (V-LED) => 5V (with a resistance of 150 Ohm) Sharp pin 2 (LED-GND) => Arduino GND pin Sharp pin 3 (LED) => Arduino pin 2 Sharp pin 4 (S-GND) => Arduino GND p...

Continue Reading...