Low Power Beacon


miniMO's Low Power Beacon is a tone/sequence generator. The program puts miniMO in a low power, or sleep condition for an adjustable interval of time; when miniMO wakes up, it plays one out of several preprogrammed sequences, then goes to sleep again (more details here).

SOURCE CODE

Download from Github

FEATURES

  • Low power sleep-awake cycle with adjustable interval from 64ms to 8s
  • Five preprogrammed tone (square wave) sequences
  • Real time sequence change
  • Real time control of sleep interval
  • Real time control of note frequency or length (depending on the sequence)
  • External modulation of either frequency or length
  • Automatic Battery check

MANUAL

I/O

  • 1&2: Outputs - signal
  • 3: Input - frequency or note length modulation / set sleep interval (when pressing button)
  • 4: Input - sequence change

OPERATION

  • Knob: change tempo (default) or frequency
    • If the button is not pressed:
      • change frequency (sequences 00 to 02)
      • change note length (sequence 03)
      • change initial note frequency (sequence 04)
    • If the button is pressed:
      • change sleep interval
    • The LED toggles ON/OFF with every note played
  • Button Press: set the sleep interval
    • To register the change, you must have the button pressed by the end of the current sequence
      • miniMO checks for a button press right before going to sleep
    • Depending on the knob's position, the interval can take values from 64ms to 8s
  • Finger Tap on both terminals of I/O 4: cycle through the available sequences
    • To register the change, you must have the terminals pressed by the end of the current sequence
    • Available Sequences (in order):
      • sequence 00: single beep
      • sequence 01: double beep
      • sequence 02: SOS in Morse code
      • sequence 03: single random tone
      • sequence 04: portamento SFX

BATTERY CHECK

When you switch the module ON,

  • If the LED blinks once, the battery is OK
  • If the LED blinks fast several times, the battery is running low

NOTES

ON CHANGING THE SEQUENCE

  • This program uses I/O 4 as a makeshift extra button
  • The best way to try this feature is to turn miniMO on, wait for a couple beeps, then gently place a finger over BOTH pins of I/O 4, until the sequence changes
  • This is an experimental feature! if for whatever reason it doesn't work for you, please let me know
  • To disable this feature,
    • comment the line that has the following code: if (analogRead(1) < 700) advanceSeq();
    • modify playSeq(value from 0 to 4) to set the initial sequence

ACKNOWLEDGMENTS

This program was inspired by Alex Wulff's Annoy-O-Bug, and uses the Watchdog setup originally described by Martin Nawrath , the square wave generation which is part of the PbSynthCode, and the Xorshift pseudorandom number generation described here. Sequence03 is a variation on Alex's original sequence.