2 Commits

Author SHA1 Message Date
Nic Limper
9d07df27f0 fix font characters <32 2023-06-07 12:32:11 +02:00
atc1441
064bd4258c Nano AP fully power Control support
The idea to switch to an array based power Control was discarded for now
2023-06-07 01:00:40 +02:00
7 changed files with 37 additions and 11 deletions

View File

@@ -168,7 +168,8 @@
"name": "Buienradar",
"desc": "Dutch rain predictions for the next two hours. Only works for locations in the Netherlands and Belgium.",
"hwtype": [
1
1,
17
],
"param": [
{
@@ -331,7 +332,7 @@
"id": 12,
"name": "Remote content",
"desc": "Content is generated by a different Access Point",
"hwtype": []
"hwtype": []
},
{
"id": 13,
@@ -393,7 +394,7 @@
"name": "bytes",
"desc": "76 bytes, formatted as 0x00,0x00,...",
"type": "text"
}
}
]
}
]

View File

@@ -85,7 +85,7 @@ build_unflags =
build_flags =
-D BUILD_ENV_NAME=$PIOENV
-D BUILD_TIME=$UNIX_TIME
-D OPENEPAPERLINK_MINI_AP_PCB
-D OPENEPAPERLINK_NANO_AP_PCB
-D ARDUINO_USB_MODE=0
-D CONFIG_SPIRAM_USE_MALLOC=1
-D CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC=y
@@ -100,10 +100,10 @@ build_flags =
-D FLASHER_AP_MOSI=39
-D FLASHER_AP_MISO=33
-D FLASHER_AP_RESET=37
-D FLASHER_AP_POWER=-1 ;18
;-D FLASHER_AP_POWER2=21
;-D FLASHER_AP_POWER3=16
;-D FLASHER_AP_POWER4=17
-D FLASHER_AP_POWER=18
-D FLASHER_AP_POWER2=21
-D FLASHER_AP_POWER3=16
-D FLASHER_AP_POWER4=17
-D FLASHER_AP_TXD=35
-D FLASHER_AP_RXD=36
-D FLASHER_AP_TEST=34

View File

@@ -51,7 +51,7 @@ void setup() {
showColorPattern(CRGB::Aqua, CRGB::Green, CRGB::Blue);
#endif
#ifdef OPENEPAPERLINK_MINI_AP_PCB
#if defined(OPENEPAPERLINK_MINI_AP_PCB) || defined(OPENEPAPERLINK_NANO_AP_PCB)
APEnterEarlyReset();
// this allows us to view the booting process. After the device showing up, you have 3 seconds to open a terminal on the COM port
vTaskDelay(3000 / portTICK_PERIOD_MS);

View File

@@ -22,6 +22,25 @@ void simpleAPPower(bool state) {
}
#endif
#ifdef OPENEPAPERLINK_NANO_AP_PCB
void simpleAPPower(bool state) {
if (FLASHER_AP_POWER >= 0 && FLASHER_AP_POWER2 >= 0 && FLASHER_AP_POWER3 >= 0 && FLASHER_AP_POWER4 >= 0) {
pinMode(FLASHER_AP_POWER, INPUT);
pinMode(FLASHER_AP_POWER2, INPUT);
pinMode(FLASHER_AP_POWER3, INPUT);
pinMode(FLASHER_AP_POWER4, INPUT);
digitalWrite(FLASHER_AP_POWER, state);
digitalWrite(FLASHER_AP_POWER2, state);
digitalWrite(FLASHER_AP_POWER3, state);
digitalWrite(FLASHER_AP_POWER4, state);
pinMode(FLASHER_AP_POWER, OUTPUT);
pinMode(FLASHER_AP_POWER2, OUTPUT);
pinMode(FLASHER_AP_POWER3, OUTPUT);
pinMode(FLASHER_AP_POWER4, OUTPUT);
}
}
#endif
// On the OpenEPaperLink board, there is no in-rush current limiting. The tags that can be connected to the board can have significant capacity, which,
// when drained if the board applies power, will cause the 3v3 rail to sag enough to reset the ESP32. This is obviously not great. To prevent this from happening,
// we ramp up/down the voltage with PWM. Ramping down really is unnecessary, as the board has a resistor to dump the charge into.
@@ -57,4 +76,9 @@ void rampTagPower(uint8_t pin, bool up) {
delay(500);
simpleAPPower(up);
#endif
#ifdef OPENEPAPERLINK_NANO_AP_PCB
simpleAPPower(false);
delay(500);
simpleAPPower(up);
#endif
}

View File

@@ -228,15 +228,16 @@ void init_web() {
WiFiManager wm;
bool res;
#ifdef OPENEPAPERLINK_MINI_AP_PCB
#if defined(OPENEPAPERLINK_MINI_AP_PCB) || defined(OPENEPAPERLINK_NANO_AP_PCB)
WiFi.setTxPower(WIFI_POWER_15dBm);
#endif
wm.setWiFiAutoReconnect(true);
res = wm.autoConnect("OpenEPaperLink Setup");
if (!res) {
Serial.println("Failed to connect");
ESP.restart();
}
#ifdef OPENEPAPERLINK_MINI_AP_PCB
#if defined(OPENEPAPERLINK_MINI_AP_PCB) || defined(OPENEPAPERLINK_NANO_AP_PCB)
WiFi.setTxPower(WIFI_POWER_19_5dBm);
#endif
Serial.print("Connected! IP address: ");