#include "main.h"
#include <Adafruit_BME280.h>
#include <Arduino.h>
#include <Ethernet.h>
#include <EthernetUdp.h>
#include <SPI.h>
#include <STAR_EthernetOTA.h>
#include <Wire.h>
#include <daq-protocol.h>
#include <esp_mac.h>
#include "firmware_hash.h"
#include "pins.h"
Go to the source code of this file.
|
| static Adafruit_BME280 | bme |
| static EthernetUDP | udp |
| static StarOTA::Server | ota_server (ENV_OTA_PORT) |
| static byte | mac [6] |
| static IPAddress | server_ip (192, 168, 2, ENV_SERVER_IP_OCTET_4) |
| static IPAddress | static_ip (192, 168, 2, ENV_BOARD_ID) |
| static IPAddress | gateway (192, 168, 2, 1) |
| static IPAddress | subnet (255, 255, 255, 0) |
| static IPAddress | dns_ip (192, 168, 2, 1) |
| static uint8_t | pkt_buf [64] |
◆ loop()
Definition at line 75 of file main.cpp.
References daq::ACTIVE, bme, daq::create_board_heartbeat_packet(), daq::create_environmental_data_packet(), delay(), ENV_BOARD_ID, ENV_HEARTBEAT_INTERVAL_MS, ENV_SEND_INTERVAL_MS, ENV_SERVER_PORT, FirmwareHash::get(), millis(), ota_server, daq::parse_server_heartbeat_packet(), pkt_buf, StarOTA::printTestMessage(), daq::SAFE, Serial, daq::SERVER_HEARTBEAT, server_ip, temp, and udp.
◆ setup()
Definition at line 30 of file main.cpp.
References bme, BME280_I2C_ADDR, delay(), dns_ip, ENV_ETH_BEGIN_DELAY_MS, ENV_ETH_INIT_DELAY_MS, ENV_ETH_SPI_DELAY_MS, ENV_LOCAL_PORT, ENV_OTA_PORT, ENV_SEND_RATE_HZ, ENV_SERVER_IP_OCTET_4, ENV_SERVER_PORT, Ethernet, gateway, mac, ota_server, PIN_ETH_CS, PIN_ETH_MISO, PIN_ETH_MOSI, PIN_ETH_SCLK, PIN_SCL, PIN_SDA, FirmwareHash::print(), Serial, static_ip, subnet, and udp.
◆ bme
◆ dns_ip
| IPAddress dns_ip(192, 168, 2, 1) |
( |
192 | , |
|
|
168 | , |
|
|
2 | , |
|
|
1 | ) |
|
static |
◆ gateway
| IPAddress gateway(192, 168, 2, 1) |
( |
192 | , |
|
|
168 | , |
|
|
2 | , |
|
|
1 | ) |
|
static |
◆ mac
◆ ota_server
◆ pkt_buf
◆ server_ip
◆ static_ip
◆ subnet
| IPAddress subnet(255, 255, 255, 0) |
( |
255 | , |
|
|
255 | , |
|
|
255 | , |
|
|
0 | ) |
|
static |
◆ udp