Skip to content

Add new board: Sparkle Motion Stick #11330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 134 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17353,6 +17353,140 @@ sparklemotionmini.menu.ZigbeeMode.zczr=Zigbee ZCZR (coordinator/router)
sparklemotionmini.menu.ZigbeeMode.zczr.build.zigbee_mode=-DZIGBEE_MODE_ZCZR
sparklemotionmini.menu.ZigbeeMode.zczr.build.zigbee_libs=-lesp_zb_api.zczr -lzboss_stack.zczr -lzboss_port.remote

##############################################################
# Adafruit Sparkle Motion Stick w/ESP32

sparklemotionstick.name=Adafruit Sparkle Motion Stick (ESP32)

sparklemotionstick.bootloader.tool=esptool_py
sparklemotionstick.bootloader.tool.default=esptool_py

sparklemotionstick.upload.tool=esptool_py
sparklemotionstick.upload.tool.default=esptool_py
sparklemotionstick.upload.tool.network=esp_ota

sparklemotionstick.upload.maximum_size=1310720
sparklemotionstick.upload.maximum_data_size=327680
sparklemotionstick.upload.flags=
sparklemotionstick.upload.extra_flags=

sparklemotionstick.serial.disableDTR=true
sparklemotionstick.serial.disableRTS=true

sparklemotionstick.build.tarch=xtensa
sparklemotionstick.build.bootloader_addr=0x1000
sparklemotionstick.build.target=esp32
sparklemotionstick.build.mcu=esp32
sparklemotionstick.build.core=esp32
sparklemotionstick.build.variant=adafruit_sparklemotionstick_esp32
sparklemotionstick.build.board=SPARKLEMOTIONSTICK_ESP32

sparklemotionstick.build.f_cpu=240000000L
sparklemotionstick.build.flash_size=4MB
sparklemotionstick.build.flash_freq=80m
sparklemotionstick.build.flash_mode=dio
sparklemotionstick.build.boot=dio
sparklemotionstick.build.partitions=default
sparklemotionstick.build.defines=
sparklemotionstick.build.loop_core=
sparklemotionstick.build.event_core=

sparklemotionstick.menu.LoopCore.1=Core 1
sparklemotionstick.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1
sparklemotionstick.menu.LoopCore.0=Core 0
sparklemotionstick.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0

sparklemotionstick.menu.EventsCore.1=Core 1
sparklemotionstick.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1
sparklemotionstick.menu.EventsCore.0=Core 0
sparklemotionstick.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0

sparklemotionstick.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
sparklemotionstick.menu.PartitionScheme.default.build.partitions=default
sparklemotionstick.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
sparklemotionstick.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
sparklemotionstick.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
sparklemotionstick.menu.PartitionScheme.minimal.build.partitions=minimal
sparklemotionstick.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
sparklemotionstick.menu.PartitionScheme.no_ota.build.partitions=no_ota
sparklemotionstick.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
sparklemotionstick.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
sparklemotionstick.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
sparklemotionstick.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
sparklemotionstick.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
sparklemotionstick.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
sparklemotionstick.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
sparklemotionstick.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
sparklemotionstick.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
sparklemotionstick.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
sparklemotionstick.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
sparklemotionstick.menu.PartitionScheme.huge_app.build.partitions=huge_app
sparklemotionstick.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
sparklemotionstick.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
sparklemotionstick.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
sparklemotionstick.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080

sparklemotionstick.menu.CPUFreq.240=240MHz (WiFi/BT)
sparklemotionstick.menu.CPUFreq.240.build.f_cpu=240000000L
sparklemotionstick.menu.CPUFreq.160=160MHz (WiFi/BT)
sparklemotionstick.menu.CPUFreq.160.build.f_cpu=160000000L
sparklemotionstick.menu.CPUFreq.80=80MHz (WiFi/BT)
sparklemotionstick.menu.CPUFreq.80.build.f_cpu=80000000L
sparklemotionstick.menu.CPUFreq.40=40MHz
sparklemotionstick.menu.CPUFreq.40.build.f_cpu=40000000L
sparklemotionstick.menu.CPUFreq.20=20MHz
sparklemotionstick.menu.CPUFreq.20.build.f_cpu=20000000L
sparklemotionstick.menu.CPUFreq.10=10MHz
sparklemotionstick.menu.CPUFreq.10.build.f_cpu=10000000L

sparklemotionstick.menu.FlashFreq.80=80MHz
sparklemotionstick.menu.FlashFreq.80.build.flash_freq=80m
sparklemotionstick.menu.FlashFreq.40=40MHz
sparklemotionstick.menu.FlashFreq.40.build.flash_freq=40m

sparklemotionstick.menu.FlashSize.4M=4MB (32Mb)
sparklemotionstick.menu.FlashSize.4M.build.flash_size=4MB

sparklemotionstick.menu.UploadSpeed.921600=921600
sparklemotionstick.menu.UploadSpeed.921600.upload.speed=921600
sparklemotionstick.menu.UploadSpeed.115200=115200
sparklemotionstick.menu.UploadSpeed.115200.upload.speed=115200
sparklemotionstick.menu.UploadSpeed.256000.windows=256000
sparklemotionstick.menu.UploadSpeed.256000.upload.speed=256000
sparklemotionstick.menu.UploadSpeed.230400.windows.upload.speed=256000
sparklemotionstick.menu.UploadSpeed.230400=230400
sparklemotionstick.menu.UploadSpeed.230400.upload.speed=230400
sparklemotionstick.menu.UploadSpeed.460800.linux=460800
sparklemotionstick.menu.UploadSpeed.460800.macosx=460800
sparklemotionstick.menu.UploadSpeed.460800.upload.speed=460800
sparklemotionstick.menu.UploadSpeed.512000.windows=512000
sparklemotionstick.menu.UploadSpeed.512000.upload.speed=512000

sparklemotionstick.menu.DebugLevel.none=None
sparklemotionstick.menu.DebugLevel.none.build.code_debug=0
sparklemotionstick.menu.DebugLevel.error=Error
sparklemotionstick.menu.DebugLevel.error.build.code_debug=1
sparklemotionstick.menu.DebugLevel.warn=Warn
sparklemotionstick.menu.DebugLevel.warn.build.code_debug=2
sparklemotionstick.menu.DebugLevel.info=Info
sparklemotionstick.menu.DebugLevel.info.build.code_debug=3
sparklemotionstick.menu.DebugLevel.debug=Debug
sparklemotionstick.menu.DebugLevel.debug.build.code_debug=4
sparklemotionstick.menu.DebugLevel.verbose=Verbose
sparklemotionstick.menu.DebugLevel.verbose.build.code_debug=5

sparklemotionstick.menu.EraseFlash.none=Disabled
sparklemotionstick.menu.EraseFlash.none.upload.erase_cmd=
sparklemotionstick.menu.EraseFlash.all=Enabled
sparklemotionstick.menu.EraseFlash.all.upload.erase_cmd=-e

sparklemotionstick.menu.ZigbeeMode.default=Disabled
+sparklemotionstick.menu.ZigbeeMode.default.build.zigbee_mode=
+sparklemotionstick.menu.ZigbeeMode.default.build.zigbee_libs=
+sparklemotionstick.menu.ZigbeeMode.zczr=Zigbee ZCZR (coordinator/router)
+sparklemotionstick.menu.ZigbeeMode.zczr.build.zigbee_mode=-DZIGBEE_MODE_ZCZR
+sparklemotionstick.menu.ZigbeeMode.zczr.build.zigbee_libs=-lesp_zb_api.zczr -lzboss_stack.zczr -lzboss_port.remote

##############################################################

nodemcu-32s.name=NodeMCU-32S
Expand Down
40 changes: 40 additions & 0 deletions variants/adafruit_sparklemotionstick_esp32/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include <stdint.h>
#include "soc/soc_caps.h"

// User LED
static const uint8_t LED_BUILTIN = 4;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN

// Neopixel
static const uint8_t PIN_NEOPIXEL = 18;
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite() and digitalWrite() for blinking
#define RGB_BUILTIN (PIN_NEOPIXEL + SOC_GPIO_PIN_COUNT)
#define RGB_BRIGHTNESS 64

static const uint8_t TX = 25; // not broken out, defined to fix compilation
static const uint8_t RX = 26; // not broken out, defined to fix compilation

#define TX1 TX
#define RX1 RX

static const uint8_t SDA = 13; // not broken out, defined to fix compilation
static const uint8_t SCL = 15; // not broken out, defined to fix compilation

static const uint8_t SS = 19; // not broken out, defined to fix compilation
static const uint8_t MOSI = 21; // output to drive dotstars
static const uint8_t SCK = 22; // output to drive dotstars
static const uint8_t MISO = 23; // not broken out, defined to fix compilation

static const uint8_t A0 = 2; // not broken out, defined to fix compilation

// internal switch
static const uint8_t BUTTON = 0;

static const uint8_t DAC1 = 25; // not broken out, defined to fix compilation
static const uint8_t DAC2 = 26; // not broken out, defined to fix compilation

#endif /* Pins_Arduino_h */