-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.h
45 lines (38 loc) · 1.12 KB
/
main.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
//system files
#include <Arduino.h>
#include "soc/soc.h" //disable brownout problems
#include "soc/rtc_cntl_reg.h" //disable brownout problems
//hardware information
#include "unitidentifier.h"
#include "versioninfo.h"
//storage
#include <Preferences.h>
//wifi and ota
#include <WiFi.h>
#include <ArduinoOTA.h>
void processOTA(uint8_t *payload, int length);
//web sockets and communication
#include <WebSocketsServer.h>
#include <AsyncUDP.h>
/**
* PORTS
* 7579 device discovery port
* 7580 commands/stream socket
**/
//udp is for transmission of connection discovery packets
//ws is for transmission of camera data, recieving of commands and OTA files for updates
AsyncUDP discoveryUDP;
WebSocketsServer communicationSocket = WebSocketsServer(7580);
void webSocketEvent(uint8_t num, WStype_t type, uint8_t *payload, size_t length);
//camera
#include "esp_camera.h"
#include "camera_pins.h"
#include "esp_timer.h"
#include "img_converters.h"
#include "fb_gfx.h"
void initializeCam();
void captureCam(uint8_t num);
//remote setup
void remoteSetup(String setup_ssid);
//startup
void startup(String uid, String ssid, String password);