📖
ESP32C3+NiMH3.3V昇圧でSlimeVRトラッカーを作ったときの突入電流対策
tps61021aを使ってNiMHを3.3Vに昇圧したけど、WiFiの突入電流電流に耐えられなかったからFWをいじってみた
雑な環境かきかき
SlimeVR FW SlimeVR-Tracker-ESP-BMI270-sfusion
ESP32C3-WROOM-02
TPS61021a
LSM6DSV
本題
main.cppの最初に
...
//これと
RTC_DATA_ATTR int bootCount = 0;
void setup()
{
//ここから
++bootCount;
if(bootCount==1) { // if first boot...
esp_sleep_enable_timer_wakeup(1000);
esp_deep_sleep_start();
}
setCpuFrequencyMhz(80);
//ここまで
Serial.begin(serialBaudRate);
...
を追記
network/wifihandler.cppのWiFiNetwork::setup()に
void WiFiNetwork::setUp() {
wifiHandlerLogger.info("Setting up WiFi");
WiFi.persistent(true);
WiFi.mode(WIFI_STA);
#if ESP8266
#if USE_ATTENUATION
WiFi.setOutputPower(20.0 - ATTENUATION_N);
#endif
WiFi.setPhyMode(WIFI_PHY_MODE_11N);
#endif
WiFi.hostname("SlimeVR FBT Tracker");
wifiHandlerLogger.info("Loaded credentials for SSID %s and pass length %d", WiFi.SSID().c_str(), WiFi.psk().length());
setStaticIPIfDefined();
wl_status_t status = WiFi.begin(); // Should connect to last used access point, see https://arduino-esp8266.readthedocs.io/en/latest/esp8266wifi/station-class.html#begin
//これ
WiFi.setTxPower(WIFI_POWER_2dBm);
wifiHandlerLogger.debug("Status: %d", status);
wifiState = SLIME_WIFI_SAVED_ATTEMPT;
wifiConnectionTimeout = millis();
で書き込むと、多分イケる
Discussion