Skip to content

Commit

Permalink
Merge pull request #16 from LeeLeahy2/4-8-WiFi_setup
Browse files Browse the repository at this point in the history
4-8: Add example 4-8-WiFi_Setup
  • Loading branch information
nseidle authored Nov 19, 2024
2 parents eb96e1d + b8b5984 commit 4c58be9
Show file tree
Hide file tree
Showing 4 changed files with 982 additions and 0 deletions.
60 changes: 60 additions & 0 deletions Example_Sketches/4_8_WiFi_Setup/4_8_WiFi_Setup.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/**********************************************************************
4_8_WiFi_Setup.ino
Example sketch to demonstrate WiFi setup
**********************************************************************/

//****************************************
// Includes
//****************************************

#include <Arduino.h> // Built-in
#include <ESPmDNS.h> // Built-in
#include <Network.h> // Built-in
#include <WiFi.h> // Built-in

#include <secrets.h> // Host name, SSIDs and passwords

bool RTK_CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC = false;

#define systemPrintf Serial.printf
#define systemPrintln Serial.println

//****************************************
// WiFi support
//****************************************

typedef uint8_t WIFI_CHANNEL_t;
typedef uint16_t WIFI_START_LIST_t;

bool apFound;
const char * apPassword;
const char * apSSID;
int authType;
bool debug;
bool display;
bool stationConnected;
bool stationHasIp;
WIFI_CHANNEL_t wifiChannel;
bool wifiScanRunning;
uint32_t wifiTimer;

//*********************************************************************
// Entry point for the application
void setup()
{
// Initialize the USB serial port
Serial.begin(115200);
systemPrintln();
systemPrintf(__FILE__ "\r\n");

// Initialize WiFi
wifiBegin();
}

//*********************************************************************
// Idle loop for core 1 of the application
void loop()
{
update();
}
Loading

0 comments on commit 4c58be9

Please sign in to comment.