Skip to content

Commit 7d6b07c

Browse files
committed
Add arduino secrets
1 parent 99c36f8 commit 7d6b07c

24 files changed

+135
-47
lines changed

examples/ESP32/ActionsHandling/ActionsHandling.ino

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
#include <time.h>
22
#include <WiFi.h>
33
#include <BytebeamArduino.h>
4+
#include "arduino_secrets.h"
45

56
// wifi credentials
6-
const char* WIFI_SSID = "YOUR_WIFI_SSID";
7-
const char* WIFI_PASSWORD = "YOUR_WIFI_PASSWORD";
7+
const char* WIFI_SSID = SECRET_SSID;
8+
const char* WIFI_PASSWORD = SECRET_PASS;
89

910
// sntp credentials
10-
const long gmtOffset_sec = 19800;
11-
const int daylightOffset_sec = 3600;
11+
const long gmtOffset_sec = 19800; // GMT + 5:30h
12+
const int daylightOffset_sec = 0;
1213
const char* ntpServer = "pool.ntp.org";
1314

1415
// function to setup the wifi with predefined credentials
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//
2+
// Place all the sensitive data here
3+
//
4+
5+
#define SECRET_SSID ""
6+
#define SECRET_PASS ""

examples/ESP32/BasicOTA/BasicOTA.ino

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
#include <time.h>
22
#include <WiFi.h>
33
#include <BytebeamArduino.h>
4+
#include "arduino_secrets.h"
45

56
const char* fwVersion = "1.0.0";
67

78
// wifi credentials
8-
const char* WIFI_SSID = "YOUR_WIFI_SSID";
9-
const char* WIFI_PASSWORD = "YOUR_WIFI_PASSWORD";
9+
const char* WIFI_SSID = SECRET_SSID;
10+
const char* WIFI_PASSWORD = SECRET_PASS;
1011

1112
// sntp credentials
12-
const long gmtOffset_sec = 19800;
13-
const int daylightOffset_sec = 3600;
13+
const long gmtOffset_sec = 19800; // GMT + 5:30h
14+
const int daylightOffset_sec = 0;
1415
const char* ntpServer = "pool.ntp.org";
1516

1617
// function to setup the wifi with predefined credentials
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//
2+
// Place all the sensitive data here
3+
//
4+
5+
#define SECRET_SSID ""
6+
#define SECRET_PASS ""

examples/ESP32/BasicOTA_GSM/BasicOTA_GSM.ino

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#define TINY_GSM_MODEM_SIM7600
22
#include <TinyGsmClient.h>
33
#include <BytebeamArduino.h>
4+
#include "arduino_secrets.h"
45

56
#define LED_PIN 12
67
#define MODEM_PWRKEY 4
@@ -9,15 +10,15 @@
910
#define MODEM_RX 26
1011

1112
// set GSM PIN, if any
12-
#define GSM_PIN ""
13+
#define GSM_PIN SECRET_PIN
1314

1415
#define SerialMon Serial
1516
#define SerialAT Serial1
1617

1718
// Your GPRS credentials, if any
18-
const char apn[] = "";
19-
const char gprsUser[] = "";
20-
const char gprsPass[] = "";
19+
const char apn[] = SECRET_APN;
20+
const char gprsUser[] = SECRET_USER;
21+
const char gprsPass[] = SECRET_PASS;
2122

2223
const char* fwVersion = "1.0.0";
2324

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//
2+
// Place all the sensitive data here
3+
//
4+
5+
#define SECRET_PIN ""
6+
#define SECRET_APN ""
7+
#define SECRET_USER ""
8+
#define SECRET_PASS ""

examples/ESP32/CloudLogging/CloudLogging.ino

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
#include <time.h>
22
#include <WiFi.h>
33
#include <BytebeamArduino.h>
4+
#include "arduino_secrets.h"
45

56
// wifi credentials
6-
const char* WIFI_SSID = "YOUR_WIFI_SSID";
7-
const char* WIFI_PASSWORD = "YOUR_WIFI_PASSWORD";
7+
const char* WIFI_SSID = SECRET_SSID;
8+
const char* WIFI_PASSWORD = SECRET_PASS;
89

910
// sntp credentials
10-
const long gmtOffset_sec = 19800;
11-
const int daylightOffset_sec = 3600;
11+
const long gmtOffset_sec = 19800; // GMT + 5:30h
12+
const int daylightOffset_sec = 0;
1213
const char* ntpServer = "pool.ntp.org";
1314

1415
// device status
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//
2+
// Place all the sensitive data here
3+
//
4+
5+
#define SECRET_SSID ""
6+
#define SECRET_PASS ""

examples/ESP32/EspTouch/EspTouch.ino

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include <time.h>
22
#include <WiFi.h>
33
#include <BytebeamArduino.h>
4+
#include "arduino_secrets.h"
45

56
// touch gpio pin number
67
#define TOUCH_GPIO_PIN 15
@@ -9,12 +10,12 @@
910
char espTouchStream[] = "esp_touch";
1011

1112
// wifi credentials
12-
const char* WIFI_SSID = "YOUR_WIFI_SSID";
13-
const char* WIFI_PASSWORD = "YOUR_WIFI_PASSWORD";
13+
const char* WIFI_SSID = SECRET_SSID;
14+
const char* WIFI_PASSWORD = SECRET_PASS;
1415

1516
// sntp credentials
16-
const long gmtOffset_sec = 19800;
17-
const int daylightOffset_sec = 3600;
17+
const long gmtOffset_sec = 19800; // GMT + 5:30h
18+
const int daylightOffset_sec = 0;
1819
const char* ntpServer = "pool.ntp.org";
1920

2021
// function to setup the wifi with predefined credentials
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//
2+
// Place all the sensitive data here
3+
//
4+
5+
#define SECRET_SSID ""
6+
#define SECRET_PASS ""

0 commit comments

Comments
 (0)