-
Notifications
You must be signed in to change notification settings - Fork 2
/
transmit.h
58 lines (43 loc) · 1.13 KB
/
transmit.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef TRANSMIT_H
#define TRANSMIT_H
#define CODE_VERSION "F-1.2.0"
#include "user_config.h"
#ifdef HEATSEEK_FEATHER_CELL_M0
#define TRANSMITTER_GSM
#else
#define TRANSMITTER_WIFI
#endif
#ifdef HEATSEEK_FEATHER_WIFI_WICED
#include <libmaple/iwdg.h>
#include <adafruit_feather.h>
#include <adafruit_http.h>
#define DHT_DATA PC2
#define SD_CS PB4
#define TRANSMITS_PER_LOOP 20
#endif
#ifdef HEATSEEK_FEATHER_WIFI_M0
#include <ArduinoHttpClient.h>
#include <WiFi101.h>
#define DHT_DATA A2
#define SD_CS 10
#define TRANSMITS_PER_LOOP 20
#endif
#ifdef TRANSMITTER_GSM
#include "Adafruit_FONA.h"
#include <Adafruit_SleepyDog.h>
#define DHT_DATA A2
#define SD_CS 10
#define FONA_RST A4
#define LORA_CS 8
#define TRANSMITS_PER_LOOP 5
#endif
#define SEND_SAVED_READINGS_THRESHOLD (10 * 60)
#define USER_AGENT_HEADER "curl/7.45.0"
#define PORT 80
void transmit(float temperature_f, float humidity, float heat_index, uint32_t current_time);
void transmit_queued_temps();
void clear_queued_transmissions();
#ifdef TRANSMITTER_WIFI
void force_wifi_reconnect();
#endif
#endif