/arduino-mkr-iot-carrier-sonos

An Arduino MKR IoT Carrier Sonos Controller

Primary LanguageC++

Arduino MKR IoT Carrier Sonos Controller

Prereqs:

Steps

  1. Install libraries with ./run.sh -c install

  2. Create Sonos/Secrets.h

    #define WIFI_SSID "WiFi SSID"
    #define WIFI_PASSWORD "WiFi Password"
  3. Edit Sonos/SonosConfig.h

    #define SONOS_ROOM "Office"
    #define SONOS_SERVER "192.168.4.30"
    #define SONOS_PORT 5005
  4. Find board fqbn and port with arduino-cli board list

  5. Run ./run.sh -b $FQBN -p $PORT -d ALL

Features

Sleep/Wake

The device will go to sleep after SLEEPms (see Utils.h) if the player state has not changed.

You can also trigger sleep/wake manually by a Tap Hold action on Button 0.

Button Lock

The player buttons will lock (indicated by the controls turning red) after LOCKms (see Utils.h) if no commands have been initiated from the player buttons.

You can also trigger lock/unlock manually by a Tap Hold action on Button 4.

Player Buttons

Button 0

  • Tap: Previous Track
  • Double Tap: First Track
  • Hold: Previous Room

Button 1

  • Tap: Volume -1
  • Double Tap: Volume -5
  • Hold: Toggle Mute

Button 2

  • Tap: Toggle Play/Pause
  • Double Tap: Toggle Shuffle
  • Hold: Toggle Repeat All/One/None

Button 3

  • Tap: Volume +1
  • Double Tap: Volume +5
  • Hold: Toggle Mute

Button 4

  • Tap: Next Track
  • Double Tap:
  • Hold: Next Room

Demo

IMG_1516-480.mov

Pics

Sleep

WiFi

Sonos Rooms

Player