Skip to content

Commit 2e2e677

Browse files
committed
Ikoka Stick: Board IDs, LED behavior
Updates the manufacturer identifier with the EBYTE module. Makes the LED behave properly. Turns the bright blue LED off after the first time you transmit anything via LoRa.
1 parent dedef49 commit 2e2e677

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

variants/ikoka_stick_nrf/ikoka_stick_nrf_board.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,17 @@ class ikoka_stick_nrf_board : public mesh::MainBoard {
1616
#if defined(P_LORA_TX_LED)
1717
void onBeforeTransmit() override {
1818
digitalWrite(P_LORA_TX_LED, LOW); // turn TX LED on
19+
#if defined(LED_BLUE)
20+
// turn off that annoying blue LED before transmitting
21+
digitalWrite(LED_BLUE, HIGH);
22+
#endif
1923
}
2024
void onAfterTransmit() override {
2125
digitalWrite(P_LORA_TX_LED, HIGH); // turn TX LED off
26+
#if defined(LED_BLUE)
27+
// do it after transmitting too, just in case
28+
digitalWrite(LED_BLUE, HIGH);
29+
#endif
2230
}
2331
#endif
2432

@@ -39,7 +47,7 @@ class ikoka_stick_nrf_board : public mesh::MainBoard {
3947
}
4048

4149
const char* getManufacturerName() const override {
42-
return "Ikoka Stick (Xiao-nrf52)";
50+
return MANUFACTURER_STRING;
4351
}
4452

4553
void reboot() override {

variants/ikoka_stick_nrf/platformio.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ extends = ikoka_stick_nrf_baseboard
6161
; No PA in this model, full 22dBm
6262
build_flags =
6363
${ikoka_stick_nrf_baseboard.build_flags}
64+
-D MANUFACTURER_STRING='"Ikoka Stick-E22-22dBm (Xiao_nrf52)"'
6465
-D LORA_TX_POWER=22
6566
build_src_filter = ${nrf52840_xiao.build_src_filter}
6667
+<helpers/*.cpp>
@@ -75,6 +76,7 @@ extends = ikoka_stick_nrf_baseboard
7576
; cause distortion in the PA output. 20dBm in -> 30dBm out
7677
build_flags =
7778
${ikoka_stick_nrf_baseboard.build_flags}
79+
-D MANUFACTURER_STRING='"Ikoka Stick-E22-30dBm (Xiao_nrf52)"'
7880
-D LORA_TX_POWER=20
7981
build_src_filter = ${nrf52840_xiao.build_src_filter}
8082
+<helpers/*.cpp>
@@ -89,6 +91,7 @@ extends = ikoka_stick_nrf_baseboard
8991
; to the rf amplifier frontend. 9dBm in -> 33dBm out
9092
build_flags =
9193
${ikoka_stick_nrf_baseboard.build_flags}
94+
-D MANUFACTURER_STRING='"Ikoka Stick-E22-33dBm (Xiao_nrf52)"'
9295
-D LORA_TX_POWER=9
9396
build_src_filter = ${nrf52840_xiao.build_src_filter}
9497
+<helpers/*.cpp>

variants/ikoka_stick_nrf/variant.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ extern "C"
3535
#define LED_GREEN (13)
3636
#define LED_BLUE (12)
3737

38-
#define LED_STATE_ON (1) // State when LED is litted
38+
#define LED_STATE_ON (0) // State when LED is litted
3939

4040
// Buttons
4141
#define PIN_BUTTON1 (PINS_COUNT)

0 commit comments

Comments
 (0)