# Nesso N1: Brownout using tone()

**URL:** <https://forum.arduino.cc/t/nesso-n1-brownout-using-tone/1428342>\
**Category:** Nesso N1\
**Created:** [January 31, 2026, 10:54pm UTC](https://forum.arduino.cc/t/nesso-n1-brownout-using-tone/1428342 "2026-01-31T22:54:24Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [January 31, 2026, 10:54pm UTC](https://forum.arduino.cc/t/nesso-n1-brownout-using-tone/1428342/1 "2026-01-31T22:54:24Z")

</div>

After using NessoN1 on the issued USB cable and successfully compiling, uploading and running many sketches, I started working on my "tones" section using `tone()` in `setup()` when NessoN1 rebooted and restarted `setup()`.

I tried another `tone()` sketch and the sketch worked without issue.

> **the "good" sketch**
>
> ```arduino
> /*
> sit - SPECIAL INFORMATION TONE
> 
> (Frequency Hz) Cadence (S): (913.8) 0.274 ON (1370.6) 0.274 ON (1776.7) 0.38 ON 1.0 OFF.
> 
> https://en.wikipedia.org/wiki/Special_information_tone
> */
> 
> char text[] = { "We're sorry. You have reached a number that has been disconnected or is no longer in service. If you feel you have reached this recording in error, please check the number, and try your call again." };
> int textsize = sizeof(text) / sizeof(text[0]);
> 
> float sitfreq[] = { 913.8, 1370.6, 1776.7, 0 };
> int duration[] = { 274, 274, 380, 1000 };
> 
> unsigned long timer;
> byte i;
> 
> byte slowbaud = 40; // teletype effect
> 
> void setup() {
> Serial.begin(115200);
> delay(1000);
> Serial.println();
> pinMode(BEEP_PIN, OUTPUT);
> }
> 
> void loop() {
> printText();
> }
> 
> void printText() {
> if (millis() - timer > slowbaud) { // slow text output
> timer = millis();
> if (i == textsize - 1) {
> Serial.println();
> makeTone(); // text complete, now tone
> i = 0;
> }
> Serial.print(text[i]);
> i++;
> }
> }
> 
> void makeTone() {
> delay(250);
> for (byte i = 0; i < 4; i++) {
> tone(BEEP_PIN, sitfreq[i]);
> delay(duration[i]);
> }
> noTone(BEEP_PIN);
> }
> 
> ```

I tried a third `tone()` sketch and got this crash, reboot, and warning...

```arduino
0E BOD: Brownout detector was triggered

ESP-ROM:esp32c6-20220919
Build:Sep 19 2022
rst:0x3 (LP_SW_HPSYS),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x4001974a
SPIWP:0xee
mode:DIO, clock div:2
load:0x40875730,len:0x12e0
load:0x4086b910,len:0xdc8
load:0x4086e610,len:0x3180
entry 0x4086b910

```

> **One of the "bad" sketches**
>
> ```arduino
> // passive buzzer musical scales
> // keyboard scale: https://i.pinimg.com/originals/cf/72/9a/cf729ae2213a849fe6b8cc527a0e7471.png
> 
> #include <Arduino_Nesso_N1.h>
> #include "freqs.h" // adapted from pitches.h: https://gist.github.com/mikeputnam/2820675
> 
> int duration, dur = 200;
> const int notes = 10;
> const int scales = 12;
> 
> const int scale[scales][notes] = {
> // N = natural S = sharp
> // O- W W H W W H W W S // Octave lower, Whole-step, Half-step
> { CN3, CN4, DN4, EN4, FN4, GN4, FN4, EN4, DN4, CN4 }, // C
> { CS3, CS4, DS4, FN4, FS4, GS4, FS4, FN4, DS4, CS4 }, // C#
> { DN3, DN4, EN4, FS4, GN4, AN4, GN4, FS4, EN4, DN4 }, // D
> { DS3, DS4, FN4, GN4, GS4, AS4, GS4, GN4, FN4, DS4 }, // D#
> { EN3, EN4, FS4, GS4, AN4, BN4, AN4, GS4, FS4, EN4 }, // E
> { FN3, FN4, GN4, AN4, AS4, CN5, AS4, AN4, GN4, FN4 }, // F
> { FS3, FS4, GS4, AS4, BN4, CS5, BN4, AS4, GS4, FS4 }, // F#
> { GN3, GN4, AN4, BN4, CN5, DN5, CN5, BN4, AN4, GN4 }, // G
> { GS3, GS4, AS4, CN5, CS5, DS5, CS5, CN5, AS4, GS4 }, // G#
> { AN3, AN4, BN4, CS5, DN5, EN5, DN5, CS5, BN4, AN4 }, // A
> { AS3, AS4, CN5, DN5, DS5, FN5, DS5, DN5, CN5, AS4 }, // A#
> { BN3, BN4, CS5, DS5, EN5, FS5, EN5, DS5, CS5, BN4 } // B
> };
> 
> void setup() {
> Serial.begin(115200);
> delay(3000); // Nesso needs a delay to connect before output to Serial Monitor
> Serial.println();
> pinMode(KEY1, INPUT_PULLUP);
> 
> Serial.println("Press KEY1");
> while (digitalRead(KEY1)) {}; // wait for KEY1 press
> delay(500); // slight delay
> 
> for (byte j = 0; j < scales; j++) {
> if (j + 1 < 10)
> Serial.print(" "); // alignment
> Serial.print(j + 1); // counting numbers
> Serial.print(" of ");
> Serial.print(scales);
> Serial.print(" scales in fifths: ");
> 
> for (byte i = 0; i < notes; i++) {
> Serial.print(i);
> if (i == 0 || i == 9) // first and last note in scale
> duration = dur * 2; // double note duration
> else
> duration = dur;
> tone(BEEP_PIN, scale[j][i], duration);
> delay(duration);
> }
> noTone(BEEP_PIN); // end tone
> Serial.println();
> }
> }
> 
> void loop() {}
> 
> ```

Reading the forum... one solution was "bad USB cable"... not the problem here... another was "setting fuses on the ESP32".... um... would Arduino do that to Nesso?... another was a peripheral was pulling the ESP into brownout... and this one was something with "Wire.h" (maybe interrupts shared with Wire.h and `tone()`?

> [@Brownout trigger code](https://forum.arduino.cc/t/brownout-trigger-code/1415364/9):
>
> Doh, I should have checked, the code has been updated since last week, and there is now a comprehensive battery management API that was added in [https://github.com/espressif/arduino-esp32/pull/12052](https://github.com/espressif/arduino-esp32/pull/12052) : See here: The talk is that it will be released as part of the next arduino-esp32 core, within the next fortnight. It also contains details in the pull request link for unbricking your nesso if the battery got too low.

Maybe I found the magic "brown-note" (musicians might know about it)... but I want to avoid it. My plan is to step through every note I have tried to produce, looking for that m\*.

Sorry for breaking Nesso every day.

---

<div class="post-metadata">

**Author:** ![qubits-us](https://avatars.discourse-cdn.com/v4/letter/q/5daacb/32.png) [@qubits-us](https://forum.arduino.cc/u/qubits-us)\
**Post date:** [January 31, 2026, 11:34pm UTC](https://forum.arduino.cc/t/nesso-n1-brownout-using-tone/1428342/2 "2026-01-31T23:34:38Z")

</div>

I’m wondering if it’s just your battery is getting low due to never being told to charge??

load a sketch that show battery level..

or it’s just too cold, brrr..

strange.. ~q

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [January 31, 2026, 11:40pm UTC](https://forum.arduino.cc/t/nesso-n1-brownout-using-tone/1428342/3 "2026-01-31T23:40:12Z")

</div>

> [@qubits-us](#):
>
> battery is getting low due to never being told to charge??

I never disconnect Nesso from USB, or I two-press RESET/BOOT/OFF verifying a disconnect.

Checking with `mazes` (battery indicator)...

---

<div class="post-metadata">

**Author:** ![qubits-us](https://avatars.discourse-cdn.com/v4/letter/q/5daacb/32.png) [@qubits-us](https://forum.arduino.cc/u/qubits-us)\
**Post date:** [January 31, 2026, 11:41pm UTC](https://forum.arduino.cc/t/nesso-n1-brownout-using-tone/1428342/4 "2026-01-31T23:41:39Z")

</div>

in the last release of mazes i still had battery charging off, so make sure to turn it on..

~q

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [January 31, 2026, 11:43pm UTC](https://forum.arduino.cc/t/nesso-n1-brownout-using-tone/1428342/5 "2026-01-31T23:43:48Z")

</div>

> [@qubits-us](#):
>
> make sure to turn it on

Is the "don't use Nesso battery charging" warning over? I thought a warning was sent out.

---

<div class="post-metadata">

**Author:** ![qubits-us](https://avatars.discourse-cdn.com/v4/letter/q/5daacb/32.png) [@qubits-us](https://forum.arduino.cc/u/qubits-us)\
**Post date:** [January 31, 2026, 11:45pm UTC](https://forum.arduino.cc/t/nesso-n1-brownout-using-tone/1428342/6 "2026-01-31T23:45:05Z")

</div>

nope it’s over with that release of the esp32 core that added battery management..

but we still do have to tell it to charge..

~q

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [February 1, 2026, 12:23am UTC](https://forum.arduino.cc/t/nesso-n1-brownout-using-tone/1428342/7 "2026-02-01T00:23:27Z")

</div>

!Battery at 3.3v... 8%... Charging enabled (`battery.enableCharge();`)... up to 3.7v and climbing. Changes seen when KEY1 is pressed. Thank you for this utility. I am now reading up on M5 and Nesso battery code.

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [February 1, 2026, 2:42am UTC](https://forum.arduino.cc/t/nesso-n1-brownout-using-tone/1428342/8 "2026-02-01T02:42:06Z")

</div>

Two hours later... update on power display in `mazes`... charge level at 4.1, but progress bar and % "seem" static at 13% (I think that was when the voltage read 3.7v). Pressing RESET or KEY1 updated and show 4.2v and 14%... but another hour later, remained 4.2/14.

Nesso N1 battery sketch reports... [https://docs.arduino.cc/tutorials/nesso-n1/user-manual/#battery-management](https://docs.arduino.cc/tutorials/nesso-n1/user-manual/#battery-management)

```arduino
Voltage: 4.19 V, Percentage: 100 %, Charging: Yes

```

M5 battery routine reports... [m5-docs](https://docs.m5stack.com/en/arduino/arduino_nesso_n1/power)  
(no camera)

> "Bat: 4192mv, Level: 100%, Charging: NO"

---

<div class="post-metadata">

**Author:** ![qubits-us](https://avatars.discourse-cdn.com/v4/letter/q/5daacb/32.png) [@qubits-us](https://forum.arduino.cc/u/qubits-us)\
**Post date:** [February 1, 2026, 2:46am UTC](https://forum.arduino.cc/t/nesso-n1-brownout-using-tone/1428342/9 "2026-02-01T02:46:12Z")

</div>

did you re-test the tone sketches??

just hope it stops all the brownouts..

~q

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [February 1, 2026, 3:14am UTC](https://forum.arduino.cc/t/nesso-n1-brownout-using-tone/1428342/10 "2026-02-01T03:14:41Z")

</div>

Returning to `mazes`... 4.2v and 100%.

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [February 1, 2026, 3:20am UTC](https://forum.arduino.cc/t/nesso-n1-brownout-using-tone/1428342/11 "2026-02-01T03:20:18Z")

</div>

> [@qubits-us](#):
>
> re-test the tone sketches

Works like a champ!

```arduino
Press KEY1
 1 of 12 scales in fifths: 0123456789
 2 of 12 scales in fifths: 0123456789
 3 of 12 scales in fifths: 0123456789
 4 of 12 scales in fifths: 0123456789
 5 of 12 scales in fifths: 0123456789
 6 of 12 scales in fifths: 0123456789
 7 of 12 scales in fifths: 0123456789
 8 of 12 scales in fifths: 0123456789
 9 of 12 scales in fifths: 0123456789
10 of 12 scales in fifths: 0123456789
11 of 12 scales in fifths: 0123456789
12 of 12 scales in fifths: 0123456789

```

Thank you for your help, again!

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [May 26, 2026, 8:13pm UTC](https://forum.arduino.cc/t/nesso-n1-brownout-using-tone/1428342/12 "2026-05-26T20:13:01Z")

</div>

> [@qubits-us](#):
>
> battery management

From of this issue, and because of your help, I load this Nesso N1 template so I know the Nesso N1 is "running" and the battery does not fully discharge. Thank you.

```arduino
#include <Arduino_Nesso_N1.h>
NessoBattery battery; // create battery instance

unsigned long blinkTimer, blinkInterval[] = { 100, 900 }; // ON for 100ms/1000ms
bool blinkState = 0; // state for LED_BUILTIN

void setup() {
  pinMode(LED_BUILTIN, OUTPUT); // configure LED_BUILTIN
  battery.begin(); // initialize battery instance
  battery.enableCharge(); // Enable charging
}

void loop() {
  if (millis() - blinkTimer >= blinkInterval[blinkState]) { // test for interval
    blinkTimer = millis(); // store timer
    blinkState = !blinkState; // toggle state
    digitalWrite(LED_BUILTIN, blinkState); // set LED_BUILTIN state
  }
}

```
