Skip to content

Commit 9641de1

Browse files
committed
feat(board): add senseBox Eye board
1 parent 6015fd7 commit 9641de1

File tree

6 files changed

+361
-0
lines changed

6 files changed

+361
-0
lines changed

boards.txt

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41309,6 +41309,196 @@ sensebox_mcu_esp32s2.menu.EraseFlash.none.upload.erase_cmd=
4130941309
sensebox_mcu_esp32s2.menu.EraseFlash.all=Enabled
4131041310
sensebox_mcu_esp32s2.menu.EraseFlash.all.upload.erase_cmd=-e
4131141311

41312+
##############################################################
41313+
# senseBox Eye
41314+
41315+
sensebox_eye.name=senseBox Eye
41316+
senseBox_eye.vid.0=0x303A
41317+
senseBox_eye.pid.0=0x82D1
41318+
senseBox_eye.vid.1=0x303A
41319+
senseBox_eye.pid.1=0x82D2
41320+
senseBox_eye.vid.2=0x303A
41321+
senseBox_eye.pid.2=0x82D3
41322+
41323+
sensebox_eye.bootloader.tool=esptool_py
41324+
sensebox_eye.bootloader.tool.default=esptool_py
41325+
41326+
sensebox_eye.upload.tool=esptool_py
41327+
sensebox_eye.upload.tool.default=esptool_py
41328+
sensebox_eye.upload.tool.network=esp_ota
41329+
41330+
sensebox_eye.upload.maximum_size=1310720
41331+
sensebox_eye.upload.maximum_data_size=327680
41332+
sensebox_eye.upload.flags=
41333+
sensebox_eye.upload.extra_flags=
41334+
sensebox_eye.upload.use_1200bps_touch=true
41335+
sensebox_eye.upload.wait_for_upload_port=true
41336+
41337+
sensebox_eye.serial.disableDTR=true
41338+
sensebox_eye.serial.disableRTS=true
41339+
41340+
sensebox_eye.build.tarch=xtensa
41341+
sensebox_eye.build.bootloader_addr=0x0
41342+
sensebox_eye.build.target=esp32s3
41343+
sensebox_eye.build.mcu=esp32s3
41344+
sensebox_eye.build.core=esp32
41345+
sensebox_eye.build.variant=sensebox_eye
41346+
sensebox_eye.build.board=sensebox_eye
41347+
41348+
sensebox_eye.build.usb_mode=0
41349+
sensebox_eye.build.cdc_on_boot=1
41350+
sensebox_eye.build.msc_on_boot=1
41351+
sensebox_eye.build.dfu_on_boot=0
41352+
sensebox_eye.build.f_cpu=240000000L
41353+
sensebox_eye.build.flash_size=16MB (128Mb)
41354+
sensebox_eye.build.flash_freq=80m
41355+
sensebox_eye.build.flash_mode=dio
41356+
sensebox_eye.build.boot=qio
41357+
sensebox_eye.build.boot_freq=80m
41358+
sensebox_eye.build.partitions=default_16MB
41359+
sensebox_eye.build.defines=
41360+
sensebox_eye.build.loop_core=
41361+
sensebox_eye.build.event_core=
41362+
sensebox_eye.build.psram_type=qspi
41363+
sensebox_eye.build.memory_type={build.boot}_{build.psram_type}
41364+
41365+
sensebox_eye.menu.JTAGAdapter.default=Disabled
41366+
sensebox_eye.menu.JTAGAdapter.default.build.copy_jtag_files=0
41367+
sensebox_eye.menu.JTAGAdapter.builtin=Integrated USB JTAG
41368+
sensebox_eye.menu.JTAGAdapter.builtin.build.openocdscript=esp32s3-builtin.cfg
41369+
sensebox_eye.menu.JTAGAdapter.builtin.build.copy_jtag_files=1
41370+
sensebox_eye.menu.JTAGAdapter.external=FTDI Adapter
41371+
sensebox_eye.menu.JTAGAdapter.external.build.openocdscript=esp32s3-ftdi.cfg
41372+
sensebox_eye.menu.JTAGAdapter.external.build.copy_jtag_files=1
41373+
sensebox_eye.menu.JTAGAdapter.bridge=ESP USB Bridge
41374+
sensebox_eye.menu.JTAGAdapter.bridge.build.openocdscript=esp32s3-bridge.cfg
41375+
sensebox_eye.menu.JTAGAdapter.bridge.build.copy_jtag_files=1
41376+
41377+
sensebox_eye.menu.PSRAM.disabled=Disabled
41378+
sensebox_eye.menu.PSRAM.disabled.build.defines=
41379+
sensebox_eye.menu.PSRAM.disabled.build.psram_type=qspi
41380+
sensebox_eye.menu.PSRAM.opi=OPI PSRAM
41381+
sensebox_eye.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM
41382+
sensebox_eye.menu.PSRAM.opi.build.psram_type=opi
41383+
41384+
sensebox_eye.menu.FlashMode.qio=QIO 80MHz
41385+
sensebox_eye.menu.FlashMode.qio.build.flash_mode=dio
41386+
sensebox_eye.menu.FlashMode.qio.build.boot=qio
41387+
sensebox_eye.menu.FlashMode.qio.build.boot_freq=80m
41388+
sensebox_eye.menu.FlashMode.qio.build.flash_freq=80m
41389+
sensebox_eye.menu.FlashMode.dio=DIO 80MHz
41390+
sensebox_eye.menu.FlashMode.dio.build.flash_mode=dio
41391+
sensebox_eye.menu.FlashMode.dio.build.boot=dio
41392+
sensebox_eye.menu.FlashMode.dio.build.boot_freq=80m
41393+
sensebox_eye.menu.FlashMode.dio.build.flash_freq=80m
41394+
41395+
sensebox_eye.menu.FlashSize.16M=16MB (128Mb)
41396+
sensebox_eye.menu.FlashSize.16M.build.flash_size=16MB
41397+
41398+
sensebox_eye.menu.LoopCore.1=Core 1
41399+
sensebox_eye.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1
41400+
sensebox_eye.menu.LoopCore.0=Core 0
41401+
sensebox_eye.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0
41402+
41403+
sensebox_eye.menu.EventsCore.1=Core 1
41404+
sensebox_eye.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1
41405+
sensebox_eye.menu.EventsCore.0=Core 0
41406+
sensebox_eye.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0
41407+
41408+
sensebox_eye.menu.USBMode.hwcdc=Hardware CDC and JTAG
41409+
sensebox_eye.menu.USBMode.hwcdc.build.usb_mode=1
41410+
sensebox_eye.menu.USBMode.default=USB-OTG (TinyUSB)
41411+
sensebox_eye.menu.USBMode.default.build.usb_mode=0
41412+
41413+
sensebox_eye.menu.CDCOnBoot.default=Enabled
41414+
sensebox_eye.menu.CDCOnBoot.default.build.cdc_on_boot=1
41415+
sensebox_eye.menu.CDCOnBoot.cdc=Disabled
41416+
sensebox_eye.menu.CDCOnBoot.cdc.build.cdc_on_boot=0
41417+
41418+
sensebox_eye.menu.MSCOnBoot.default=Disabled
41419+
sensebox_eye.menu.MSCOnBoot.default.build.msc_on_boot=0
41420+
sensebox_eye.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode)
41421+
sensebox_eye.menu.MSCOnBoot.msc.build.msc_on_boot=1
41422+
41423+
sensebox_eye.menu.DFUOnBoot.default=Disabled
41424+
sensebox_eye.menu.DFUOnBoot.default.build.dfu_on_boot=0
41425+
sensebox_eye.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode)
41426+
sensebox_eye.menu.DFUOnBoot.dfu.build.dfu_on_boot=1
41427+
41428+
sensebox_eye.menu.UploadMode.default=UART0 / Hardware CDC
41429+
sensebox_eye.menu.UploadMode.default.upload.use_1200bps_touch=false
41430+
sensebox_eye.menu.UploadMode.default.upload.wait_for_upload_port=false
41431+
sensebox_eye.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB)
41432+
sensebox_eye.menu.UploadMode.cdc.upload.use_1200bps_touch=true
41433+
sensebox_eye.menu.UploadMode.cdc.upload.wait_for_upload_port=true
41434+
41435+
sensebox_eye.menu.PartitionScheme.default_16MB=Default (6.25MB APP/3.43MB SPIFFS)
41436+
sensebox_eye.menu.PartitionScheme.default_16MB.build.partitions=default_16MB
41437+
sensebox_eye.menu.PartitionScheme.default_16MB.upload.maximum_size=6553600
41438+
sensebox_eye.menu.PartitionScheme.large_spiffs=Large SPIFFS (4.5MB APP/6.93MB SPIFFS)
41439+
sensebox_eye.menu.PartitionScheme.large_spiffs.build.partitions=large_spiffs_16MB
41440+
sensebox_eye.menu.PartitionScheme.large_spiffs.upload.maximum_size=4718592
41441+
sensebox_eye.menu.PartitionScheme.app3M_fat9M_16MB=FFAT (3MB APP/9MB FATFS)
41442+
sensebox_eye.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
41443+
sensebox_eye.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
41444+
sensebox_eye.menu.PartitionScheme.fatflash=Large FFAT (2MB APP/12.5MB FATFS)
41445+
sensebox_eye.menu.PartitionScheme.fatflash.build.partitions=ffat
41446+
sensebox_eye.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
41447+
sensebox_eye.menu.PartitionScheme.tinyuf2=TinyUF2 Compatibility (2MB APP/12MB FFAT)
41448+
sensebox_eye.menu.PartitionScheme.tinyuf2.build.custom_bootloader=bootloader_tinyuf2
41449+
sensebox_eye.menu.PartitionScheme.tinyuf2.build.custom_partitions=partitions_tinyuf2
41450+
sensebox_eye.menu.PartitionScheme.tinyuf2.upload.maximum_size=2097152
41451+
sensebox_eye.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x410000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin"
41452+
sensebox_eye.menu.PartitionScheme.gen4esp32scheme4=Huge App (16MB APP)
41453+
sensebox_eye.menu.PartitionScheme.gen4esp32scheme4.build.custom_partitions=gen4esp32_16MBapp
41454+
sensebox_eye.menu.PartitionScheme.gen4esp32scheme4.upload.maximum_size=16646144
41455+
41456+
sensebox_eye.menu.CPUFreq.240=240MHz (WiFi)
41457+
sensebox_eye.menu.CPUFreq.240.build.f_cpu=240000000L
41458+
sensebox_eye.menu.CPUFreq.160=160MHz (WiFi)
41459+
sensebox_eye.menu.CPUFreq.160.build.f_cpu=160000000L
41460+
sensebox_eye.menu.CPUFreq.80=80MHz (WiFi)
41461+
sensebox_eye.menu.CPUFreq.80.build.f_cpu=80000000L
41462+
sensebox_eye.menu.CPUFreq.40=40MHz
41463+
sensebox_eye.menu.CPUFreq.40.build.f_cpu=40000000L
41464+
sensebox_eye.menu.CPUFreq.20=20MHz
41465+
sensebox_eye.menu.CPUFreq.20.build.f_cpu=20000000L
41466+
sensebox_eye.menu.CPUFreq.10=10MHz
41467+
sensebox_eye.menu.CPUFreq.10.build.f_cpu=10000000L
41468+
41469+
sensebox_eye.menu.UploadSpeed.921600=921600
41470+
sensebox_eye.menu.UploadSpeed.921600.upload.speed=921600
41471+
sensebox_eye.menu.UploadSpeed.115200=115200
41472+
sensebox_eye.menu.UploadSpeed.115200.upload.speed=115200
41473+
sensebox_eye.menu.UploadSpeed.256000.windows=256000
41474+
sensebox_eye.menu.UploadSpeed.256000.upload.speed=256000
41475+
sensebox_eye.menu.UploadSpeed.230400.windows.upload.speed=256000
41476+
sensebox_eye.menu.UploadSpeed.230400=230400
41477+
sensebox_eye.menu.UploadSpeed.230400.upload.speed=230400
41478+
sensebox_eye.menu.UploadSpeed.460800.linux=460800
41479+
sensebox_eye.menu.UploadSpeed.460800.macosx=460800
41480+
sensebox_eye.menu.UploadSpeed.460800.upload.speed=460800
41481+
sensebox_eye.menu.UploadSpeed.512000.windows=512000
41482+
sensebox_eye.menu.UploadSpeed.512000.upload.speed=512000
41483+
41484+
sensebox_eye.menu.DebugLevel.none=None
41485+
sensebox_eye.menu.DebugLevel.none.build.code_debug=0
41486+
sensebox_eye.menu.DebugLevel.error=Error
41487+
sensebox_eye.menu.DebugLevel.error.build.code_debug=1
41488+
sensebox_eye.menu.DebugLevel.warn=Warn
41489+
sensebox_eye.menu.DebugLevel.warn.build.code_debug=2
41490+
sensebox_eye.menu.DebugLevel.info=Info
41491+
sensebox_eye.menu.DebugLevel.info.build.code_debug=3
41492+
sensebox_eye.menu.DebugLevel.debug=Debug
41493+
sensebox_eye.menu.DebugLevel.debug.build.code_debug=4
41494+
sensebox_eye.menu.DebugLevel.verbose=Verbose
41495+
sensebox_eye.menu.DebugLevel.verbose.build.code_debug=5
41496+
41497+
sensebox_eye.menu.EraseFlash.none=Disabled
41498+
sensebox_eye.menu.EraseFlash.none.upload.erase_cmd=
41499+
sensebox_eye.menu.EraseFlash.all=Enabled
41500+
sensebox_eye.menu.EraseFlash.all.upload.erase_cmd=-e
41501+
4131241502
##############################################################
4131341503

4131441504
nano_nora.name=Arduino Nano ESP32
21.8 KB
Binary file not shown.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# ESP-IDF Partition Table
2+
# Name, Type, SubType, Offset, Size, Flags
3+
# bootloader.bin,, 0x1000, 32K
4+
# partition table, 0x8000, 4K
5+
nvs, data, nvs, 0x9000, 20K,
6+
otadata, data, ota, 0xe000, 8K,
7+
ota_0, 0, ota_0, 0x10000, 2048K,
8+
ota_1, 0, ota_1, 0x210000, 2048K,
9+
uf2, app, factory,0x410000, 256K,
10+
ffat, data, fat, 0x450000, 11968K,

variants/sensebox_eye/pins_arduino.h

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#ifndef Pins_Arduino_h
2+
#define Pins_Arduino_h
3+
4+
#include <stdint.h>
5+
6+
#define USB_VID 0x303A
7+
#define USB_PID 0x81B8
8+
#define USB_MANUFACTURER "senseBox"
9+
#define USB_PRODUCT "Eye ESP32S3"
10+
#define USB_SERIAL "" // Empty string for MAC address
11+
12+
// Default USB FirmwareMSC Settings
13+
#define USB_FW_MSC_VENDOR_ID "senseBox" // max 8 chars
14+
#define USB_FW_MSC_PRODUCT_ID "Eye ESP32S3" // max 16 chars
15+
#define USB_FW_MSC_PRODUCT_REVISION "1.00" // max 4 chars
16+
#define USB_FW_MSC_VOLUME_NAME "senseBox" // max 11 chars
17+
#define USB_FW_MSC_SERIAL_NUMBER 0x00000000
18+
19+
#define PIN_RGB_LED 45 // RGB LED
20+
#define RGBLED_PIN 45 // RGB LED
21+
#define PIN_LED 45
22+
#define RGBLED_NUM 1 // number of RGB LEDs
23+
24+
// Default I2C QWIIC-Ports
25+
static const uint8_t SDA = 2;
26+
static const uint8_t SCL = 1;
27+
#define PIN_QWIIC_SDA 2
28+
#define PIN_QWIIC_SCL 1
29+
30+
// IO Pins
31+
#define PIN_IO14 14
32+
static const uint8_t A14 = PIN_IO14; // Analog
33+
static const uint8_t D14 = PIN_IO14; // Digital
34+
static const uint8_t T14 = PIN_IO14; // Touch
35+
#define PIN_IO48 48
36+
static const uint8_t A48 = PIN_IO48; // Analog
37+
static const uint8_t D48 = PIN_IO48; // Digital
38+
static const uint8_t T48 = PIN_IO48; // Touch
39+
40+
// Button
41+
#define PIN_BUTTON 47
42+
43+
// UART Port
44+
static const uint8_t TX = 43;
45+
static const uint8_t RX = 44;
46+
#define PIN_UART_TXD 43
47+
#define PIN_UART_RXD 44
48+
#define PIN_UART_ENABLE 26
49+
50+
// SD-Card
51+
#define MISO 40
52+
#define MOSI 38
53+
#define SCK 39
54+
#define SS 41
55+
#define SD_ENABLE 3
56+
57+
#define PIN_SD_MISO 40
58+
#define PIN_SD_MOSI 38
59+
#define PIN_SD_SCLK 39
60+
#define PIN_SD_CS 41
61+
#define PIN_SD_ENABLE 3
62+
63+
// USB
64+
#define PIN_USB_DM 19
65+
#define PIN_USB_DP 20
66+
67+
// Camera
68+
#define PWDN_GPIO_NUM 46
69+
#define RESET_GPIO_NUM -1
70+
#define XCLK_GPIO_NUM 15
71+
#define SIOD_GPIO_NUM 4
72+
#define SIOC_GPIO_NUM 5
73+
74+
#define Y9_GPIO_NUM 16
75+
#define Y8_GPIO_NUM 17
76+
#define Y7_GPIO_NUM 18
77+
#define Y6_GPIO_NUM 12
78+
#define Y5_GPIO_NUM 10
79+
#define Y4_GPIO_NUM 8
80+
#define Y3_GPIO_NUM 9
81+
#define Y2_GPIO_NUM 11
82+
#define VSYNC_GPIO_NUM 6
83+
#define HREF_GPIO_NUM 7
84+
#define PCLK_GPIO_NUM 13
85+
86+
// LoRa
87+
#define LORA_TX 43
88+
#define LORA_RX 44
89+
90+
#endif /* Pins_Arduino_h */

variants/sensebox_eye/tinyuf2.bin

183 KB
Binary file not shown.

variants/sensebox_eye/variant.cpp

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/*
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2021 Ha Thach (tinyusb.org) for Adafruit Industries
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in
14+
* all copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
* THE SOFTWARE.
23+
*/
24+
25+
#include "esp32-hal-gpio.h"
26+
#include "pins_arduino.h"
27+
#include "driver/rmt_tx.h"
28+
#include "esp_log.h"
29+
30+
extern "C" {
31+
32+
void initVariant(void) {
33+
rmt_channel_handle_t led_chan = NULL;
34+
rmt_tx_channel_config_t tx_chan_config = {};
35+
tx_chan_config.clk_src = RMT_CLK_SRC_DEFAULT;
36+
tx_chan_config.resolution_hz = 10 * 1000 * 1000;
37+
tx_chan_config.mem_block_symbols = 64;
38+
tx_chan_config.trans_queue_depth = 4;
39+
tx_chan_config.gpio_num = (gpio_num_t)PIN_LED;
40+
tx_chan_config.flags.invert_out = false;
41+
tx_chan_config.flags.with_dma = false;
42+
ESP_ERROR_CHECK(rmt_new_tx_channel(&tx_chan_config, &led_chan));
43+
44+
// WS2812 encoder config (available in `esp-rmt`)
45+
rmt_encoder_handle_t ws2812_encoder = NULL;
46+
rmt_bytes_encoder_config_t bytes_encoder_config = {
47+
.bit0 = { .duration0 = 4, .level0 = 1, .duration1 = 9, .level1 = 0 },
48+
.bit1 = { .duration0 = 8, .level0 = 1, .duration1 = 5, .level1 = 0 },
49+
.flags = { .msb_first = true }
50+
};
51+
ESP_ERROR_CHECK(rmt_new_bytes_encoder(&bytes_encoder_config, &ws2812_encoder));
52+
53+
ESP_ERROR_CHECK(rmt_enable(led_chan));
54+
55+
// WS2812 GRB data (green pixel)
56+
uint8_t pixel[3] = { 0x10, 0x00, 0x00 }; // green
57+
rmt_transmit_config_t tx_config = {
58+
.loop_count = 0
59+
};
60+
ESP_ERROR_CHECK(rmt_transmit(led_chan, ws2812_encoder, pixel, sizeof(pixel), &tx_config));
61+
rmt_tx_wait_all_done(led_chan, portMAX_DELAY);
62+
63+
// Wait a moment
64+
delay(50);
65+
66+
// Turn LED off
67+
uint8_t pixel_off[3] = { 0x00, 0x00, 0x00 };
68+
ESP_ERROR_CHECK(rmt_transmit(led_chan, ws2812_encoder, pixel_off, sizeof(pixel_off), &tx_config));
69+
rmt_tx_wait_all_done(led_chan, portMAX_DELAY);
70+
}
71+
}

0 commit comments

Comments
 (0)