Skip to content

Instantly share code, notes, and snippets.

@ammmze
Last active July 9, 2024 14:33
Show Gist options
  • Save ammmze/123a5ef5189935596847848a76236dbe to your computer and use it in GitHub Desktop.
Save ammmze/123a5ef5189935596847848a76236dbe to your computer and use it in GitHub Desktop.
Mellow SHT36 v3

Flashing Katapult

Hold the boot button while connecting via USB.

Screenshot 2024-07-08 at 10 44 32 PM
cd ~/katapult
make clean KCONFIG_CONFIG=.shtv3.config OUT=shtv3.out/
make menuconfig KCONFIG_CONFIG=.shtv3.config OUT=shtv3.out/
make KCONFIG_CONFIG=.shtv3.config OUT=shtv3.out/ -j4
sudo service klipper stop
make KCONFIG_CONFIG=.shtv3.config OUT=shtv3.out/ FLASH_DEVICE=2e8a:0003 flash

Important

The last line above has 2e8a:0003 where you need to replace with the flash device id for your device (which may or may not be the same). You can find it by running lsusb and look for 2e8a:0003 Raspberry Pi RP2 Boot. See here.

Flashing Klipper

Connect via CAN header...unplug USB.

Screenshot 2024-07-08 at 10 44 59 PM
cd ~/klipper
make clean KCONFIG_CONFIG=.shtv3.config OUT=shtv3.out/
make menuconfig KCONFIG_CONFIG=.shtv3.config OUT=shtv3.out/
make KCONFIG_CONFIG=.shtv3.config OUT=shtv3.out/ -j4
sudo service klipper stop
python3 ~/katapult/scripts/flashtool.py -i can0 -f ~/klipper/shtv3.out/klipper.bin -u d9543e536c0a -v

Important

Replace d9543e536c0a with your own CAN identifier.

# Note: Config is incomplete ... just setting up board pins, verifying mcu temp and accelerometer connection.
[mcu toolhead]
canbus_uuid: d9543e536c0a
[board_pins toolhead]
mcu: toolhead
aliases:
aliases_2209:
EXT_EN=gpio14,EXT_STEP=gpio7,EXT_DIR=gpio6,EXT_UART=gpio15,EXT_DIAG=
aliases_endstop:
LIMIT_0=gpio20,LIMIT_1=gpio16
aliases_probe:
PROBE_1=gpio22,PROBE_2=gpio24
aliases_cnc_fans:
FAN0=gpio13,FAN1=gpio21
aliases_thermistors:
TH0=gpio27,PT100=gpio17,TC0=
aliases_heaters:
HE0=gpio23
aliases_rgb:
RGBLED=gpio26
aliases_lis2dw:
LIS2DW=gpio12
aliases_spi:
MOSI=gpio3,MISO=gpio4,SCK=gpio2
[temperature_sensor toolhead]
sensor_type: temperature_mcu
sensor_mcu: toolhead
[lis2dw]
cs_pin: toolhead:LIS2DW
spi_software_sclk_pin: toolhead:SCK
spi_software_mosi_pin: toolhead:MOSI
spi_software_miso_pin: toolhead:MISO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment