STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
main.cpp File Reference
#include <Arduino.h>
#include <ETH.h>
#include <Ethernet.h>
#include <EthernetUdp.h>
#include <SPI.h>
#include <WiFi.h>
Include dependency graph for main.cpp:

Go to the source code of this file.

Macros

#define ETH_CLK_PIN   7
#define ETH_MISO_PIN   41
#define ETH_MOSI_PIN   13
#define ETH_CS_PIN   6
#define ETH_PHY_ADDR   0

Functions

void setup ()
void loop ()

Variables

IPAddress staticIP (192, 168, 2, 100)
IPAddress gateway (192, 168, 2, 1)
IPAddress subnet (255, 255, 255, 0)
IPAddress dns (192, 168, 2, 1)
IPAddress receiverIP (192, 168, 2, 1)
const int receiverPort = 5006
EthernetUDP udp
byte mac [] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED}

Macro Definition Documentation

◆ ETH_CLK_PIN

#define ETH_CLK_PIN   7

Definition at line 8 of file main.cpp.

◆ ETH_CS_PIN

#define ETH_CS_PIN   6

Definition at line 11 of file main.cpp.

◆ ETH_MISO_PIN

#define ETH_MISO_PIN   41

Definition at line 9 of file main.cpp.

◆ ETH_MOSI_PIN

#define ETH_MOSI_PIN   13

Definition at line 10 of file main.cpp.

◆ ETH_PHY_ADDR

#define ETH_PHY_ADDR   0

Definition at line 12 of file main.cpp.

Function Documentation

◆ loop()

void loop ( )

Definition at line 41 of file main.cpp.

References delay(), millis(), receiverIP, receiverPort, Serial, and udp.

◆ setup()

void setup ( void )

Definition at line 24 of file main.cpp.

References delay(), dns, ETH_CLK_PIN, ETH_CS_PIN, ETH_MISO_PIN, ETH_MOSI_PIN, Ethernet, gateway, mac, Serial, staticIP, subnet, and udp.

Variable Documentation

◆ dns

IPAddress dns(192, 168, 2, 1) ( 192 ,
168 ,
2 ,
1  )

◆ gateway

IPAddress gateway(192, 168, 2, 1) ( 192 ,
168 ,
2 ,
1  )

◆ mac

byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED}

Definition at line 22 of file main.cpp.

◆ receiverIP

IPAddress receiverIP(192, 168, 2, 1) ( 192 ,
168 ,
2 ,
1  )

◆ receiverPort

const int receiverPort = 5006

Definition at line 19 of file main.cpp.

◆ staticIP

IPAddress staticIP(192, 168, 2, 100) ( 192 ,
168 ,
2 ,
100  )

◆ subnet

IPAddress subnet(255, 255, 255, 0) ( 255 ,
255 ,
255 ,
0  )

◆ udp

EthernetUDP udp

Definition at line 20 of file main.cpp.