1) 14c + 19h = 421
2) c + h = 24
3) [2 x 14]
14c + 14h = 336
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The microcontroller used was a SeeedStudio XIAO RP2040. | |
# Modify `spi` and `cs` appropriately to work on any other micro. | |
from machine import Pin, SPI | |
spi = SPI(0, baudrate=20_000_000) # Initialise SPI at 20MHz. Note that on RP2040 due to clock configurations this is closer to 15MHz. | |
cs = Pin.board.CSn | |
cs.init(Pin.OUT, value=1) # Initialise CS high, ie no transmission |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def i2cdetect(addresses): | |
print(" 0 1 2 3 4 5 6 7 8 9 a b c d e f") | |
for i in range(0x8): | |
print(f"{i*0x10:02x}:", end="") | |
for j in range(0x10): | |
addr = i * 0x10 + j | |
if 0x02 < addr < 0x78: | |
if addr in addresses: | |
print(f" {addr:02x}", end="") | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define MICROPY_HW_BOARD_NAME "NUCLEO_H503RB" | |
#define MICROPY_HW_MCU_NAME "STM32H503RB" | |
#define MICROPY_CONFIG_ROM_LEVEL (MICROPY_CONFIG_ROM_LEVEL_CORE_FEATURES) | |
#define MICROPY_PY_PYB_LEGACY (0) | |
#define MICROPY_HW_ENABLE_INTERNAL_FLASH_STORAGE (1) | |
#define MICROPY_HW_ENABLE_RTC (1) | |
#define MICROPY_HW_ENABLE_RNG (1) | |
#define MICROPY_HW_ENABLE_ADC (1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
tpp = """ | |
┌────┐ | |
╭───┤ ├───╮ | |
│ │ │ │ | |
[MO] [23] │ ⌾ └────┘ ⌾ │ [BAT] | |
[MI] [19] │ ⌾ ▣ │ ⏚ | |
[SCK] [18] │ ⌾ ⌾ │ [5V] | |
[SS] [ 5] │ ⌾ ⌾ │ [3V3] | |
[SCL] [22] │ ⌾ ⌾ │ [ 4] [TCH0] [ADC2-0] [RTC10] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
▁▁ | |
▁▁▏▕▁▁ | |
▏▕ | |
▔▔ |
Feature | Supported |
---|---|
Pin | ✅ |
PWM | ❌ |
ADC | ❌ |
DAC | ❌ |
Timer | ❌ |
UART | ❌ |
Soft I2C | ❌ |
I2C | ❌ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ports/stm32/boards/NODE_151/mpconfigboard.h b/ports/stm32/boards/NODE_151/mpconfigboard.h | |
index a16a88e6e..f5344ca0d 100644 | |
--- a/ports/stm32/boards/NODE_151/mpconfigboard.h | |
+++ b/ports/stm32/boards/NODE_151/mpconfigboard.h | |
@@ -1,8 +1,8 @@ | |
#define MICROPY_HW_BOARD_NAME "Node151v2.2" | |
#define MICROPY_HW_MCU_NAME "STM32L151CCU" | |
-#define MICROPY_HW_UART_REPL PYB_UART_1 | |
-#define MICROPY_HW_UART_REPL_BAUD 115200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ports/stm32/boards/NODE_151/mpconfigboard.h b/ports/stm32/boards/NODE_151/mpconfigboard.h | |
index 99ffc1f70..23358e9a9 100644 | |
--- a/ports/stm32/boards/NODE_151/mpconfigboard.h | |
+++ b/ports/stm32/boards/NODE_151/mpconfigboard.h | |
@@ -5,7 +5,7 @@ | |
#define MICROPY_HW_ENABLE_ADC (0) | |
#define MICROPY_HW_ENABLE_DMA (0) | |
#define MICROPY_HW_HAS_SWITCH (0) // Ought to be able to turn back on | |
-#define MICROPY_HW_HAS_FLASH (1) | |
+#define MICROPY_HW_HAS_FLASH (0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/.gitmodules b/.gitmodules | |
index ceaa5342b..7a2fe6bb3 100644 | |
--- a/.gitmodules | |
+++ b/.gitmodules | |
@@ -13,8 +13,8 @@ | |
url = https://github.com/pfalcon/berkeley-db-1.xx | |
[submodule "lib/stm32lib"] | |
path = lib/stm32lib | |
- url = https://github.com/micropython/stm32lib | |
- branch = work-F4-1.13.1+F7-1.5.0+L4-1.3.0 |
NewerOlder