forked from community/product-iots
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
1.6 KiB
75 lines
1.6 KiB
10 years ago
|
#ifndef ArduinoWifiAgent_H
|
||
|
#define ArduinoWifiAgent_H
|
||
10 years ago
|
|
||
10 years ago
|
#include "Arduino.h"
|
||
10 years ago
|
|
||
|
// These are the interrupt and control pins
|
||
|
#define ADAFRUIT_CC3000_IRQ 3 // MUST be an interrupt pin!
|
||
10 years ago
|
// These can be any two pins
|
||
10 years ago
|
#define ADAFRUIT_CC3000_VBAT 5
|
||
|
#define ADAFRUIT_CC3000_CS 10
|
||
|
|
||
10 years ago
|
#define WLAN_SSID "SSID" // cannot be longer than 32 characters!
|
||
|
#define WLAN_PASS "password"
|
||
10 years ago
|
|
||
10 years ago
|
#define WLAN_SECURITY WLAN_SEC_WPA
|
||
|
// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2
|
||
|
#define IDLE_TIMEOUT_MS 3000
|
||
10 years ago
|
|
||
10 years ago
|
#define DEVICE_OWNER "${DEVICE_OWNER}"
|
||
|
#define DEVICE_ID "${DEVICE_ID}"
|
||
|
#define DEVICE_TOKEN "${DEVICE_TOKEN}"
|
||
10 years ago
|
|
||
10 years ago
|
#define SERVICE_PORT 9763
|
||
|
#define SERVICE_EPOINT "/sensebot/controller/"
|
||
10 years ago
|
|
||
10 years ago
|
#define BUZZER A0
|
||
|
#define LDR_PIN A1
|
||
|
#define TEMP_PIN A2
|
||
|
#define PIR_PIN A3
|
||
|
#define SONAR_TRIG A4
|
||
|
#define SONAR_ECHO A5
|
||
|
|
||
|
#define BUZZER_SOUND 100
|
||
|
#define MAX_DISTANCE 30
|
||
|
|
||
|
#define TURN_DELAY 100
|
||
|
|
||
10 years ago
|
#define PUSH_INTERVAL 30000
|
||
10 years ago
|
#define MAX_ACTION 6 // Maximum length of the HTTP action that can be parsed.
|
||
|
|
||
10 years ago
|
#define MAX_PATH 10
|
||
10 years ago
|
#define BUFFER_SIZE MAX_ACTION + MAX_PATH + 10 // Size of buffer for incoming request data.
|
||
|
|
||
10 years ago
|
#define TIMEOUT_MS 500
|
||
10 years ago
|
|
||
|
#define DEBUG false
|
||
10 years ago
|
#define CON_DEBUG false
|
||
|
|
||
|
|
||
|
|
||
|
byte server[4] = { 192, 168, 1, 101 };
|
||
|
String host, jsonPayLoad;
|
||
|
unsigned long pushTimestamp = 0;
|
||
|
unsigned long pollTimestamp = 0;
|
||
|
|
||
|
#define LISTEN_PORT 80
|
||
|
|
||
|
byte motion_global = 0;
|
||
|
byte temperature = 0;
|
||
|
int pir =0;
|
||
|
int sonar=0;
|
||
|
int ldr =0;
|
||
|
|
||
|
const byte motor_left[] = {7, 8};
|
||
|
const byte enA = 12;
|
||
|
|
||
|
const byte motor_right[] = {4, 6};
|
||
|
const byte enB = 11;
|
||
|
String urlPath;
|
||
10 years ago
|
|
||
|
#endif
|
||
|
|
||
|
|
||
10 years ago
|
|