diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..625d113 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +export MARKPROMPT_API_KEY=3QKoVorXwqmgSoOR3IP4xSGDqLA6Izt9 diff --git a/content/SUMMARY.md b/content/SUMMARY.md index 54bacce..7ed6860 100644 --- a/content/SUMMARY.md +++ b/content/SUMMARY.md @@ -40,6 +40,7 @@ - [Electronics tips](maker-things/electronics-tips.md) - [GRBL_ESP32 tips](maker-things/grbl-esp32-tips.md) - [How to properly level your 3D printer](maker-things/how-to-properly-level-your-3d-printer.md) + - [Installing BLTouch-compatible firmware onto the TwoTrees Sapphire Pro](maker-things/installing-bltouch-compatible-firmware-onto-the-twotrees-sapphire-pro.md) - [Software](software/index.md) - [Black pills](software/black-pills.md) - [Getting VoWiFi working on Xiaomi.eu](software/getting-vowifi-working-on-xiaomi-eu.md) diff --git a/content/ardupilot/ardupilot-setup-checklist.md b/content/ardupilot/ardupilot-setup-checklist.md index 733f462..4cdfa0d 100644 --- a/content/ardupilot/ardupilot-setup-checklist.md +++ b/content/ardupilot/ardupilot-setup-checklist.md @@ -85,6 +85,7 @@ The values in this section are specific to the Omnibus F4, but the settings aren - [ ] Set `THR_PASS_STAB=1` so you have total throttle control in ACRO/FBWA/STABILIZE. - [ ] Set `ARSPD_FBW_MIN`/`ARSPD_FBW_MAX` to the minimum and maximum airspeed you want auto modes to fly (see the TECS tuning guide below for details). - [ ] Set `MIN_GNDSPD_CM=833` (30 km/h) so the craft makes an effort to return even under high winds. +- [ ] Set `RTL_SINK_MAX=2` to enable a very slow descent on RTL (you generally don't need to descend fast on RTL). ## Auto takeoff @@ -111,6 +112,6 @@ _(Many thanks to Michel Pastor and mfoos for their help with everything in this * * *

-Last updated on July 21, 2022. For any questions/feedback, +Last updated on April 15, 2023. For any questions/feedback, email me at hi@stavros.io.

diff --git a/content/maker-things/index.md b/content/maker-things/index.md index 28ce446..fc144c0 100644 --- a/content/maker-things/index.md +++ b/content/maker-things/index.md @@ -6,3 +6,4 @@ Click on a link in the list below to go to that page: 1. [Electronics tips](../../maker-things/electronics-tips.html) 1. [GRBL_ESP32 tips](../../maker-things/grbl-esp32-tips.html) 1. [How to properly level your 3D printer](../../maker-things/how-to-properly-level-your-3d-printer.html) +1. [Installing BLTouch-compatible firmware onto the TwoTrees Sapphire Pro](../../maker-things/installing-bltouch-compatible-firmware-onto-the-twotrees-sapphire-pro.html) diff --git a/content/maker-things/installing-bltouch-compatible-firmware-onto-the-twotrees-sapphire-pro.md b/content/maker-things/installing-bltouch-compatible-firmware-onto-the-twotrees-sapphire-pro.md new file mode 100644 index 0000000..c05a0b2 --- /dev/null +++ b/content/maker-things/installing-bltouch-compatible-firmware-onto-the-twotrees-sapphire-pro.md @@ -0,0 +1,21 @@ +# Installing BLTouch-compatible firmware onto the TwoTrees Sapphire Pro + +I installed a BLTouch/3D Touch probe onto my TwoTrees Sapphire Pro, and configuring the firmware was a bit involved. Here's the process: + +* Clone the [Marlin repo from GitHub](https://github.com/MarlinFirmware/Marlin). +* Download [the configurations](https://github.com/MarlinFirmware/Configurations/archive/bugfix-2.1.x.zip). +* Checkout the `2.1` branch (the configurations seem to be tailored to it and I couldn't be bothered changing). +* Replace the `Configuration.h` and `Configuration_adv.h` files with the ones from the configurations zip. +* Uncomment the `SPRO_BLTOUCH` define. +* I also changed my dimensions to `X_BED_SIZE 230` and `Y_BED_SIZE 225`, for a more realistic bed size. +* Build with `pio run -e mks_robin_nano35`. +* Copy `.pio/build/mks_robin_nano35/Robin_nano35.bin` to the SD card. +* Insert the card into the printer and turn it on. +* Done! + +* * * + +

+Last updated on April 21, 2023. For any questions/feedback, +email me at hi@stavros.io. +

diff --git a/docs.zip b/docs.zip new file mode 100644 index 0000000..3134232 Binary files /dev/null and b/docs.zip differ diff --git a/upload_to_markprompt b/upload_to_markprompt new file mode 100755 index 0000000..73de7ad --- /dev/null +++ b/upload_to_markprompt @@ -0,0 +1,28 @@ +#!/usr/bin/env python3 +import json +import os +import urllib.request +from pathlib import Path +from typing import Dict + + +def upload_files(file_dict: Dict[str, str]) -> str: + data = json.dumps(file_dict).encode() + + url = "https://api.markprompt.com/train" + headers = { + "Authorization": f'Bearer {os.getenv("MARKPROMPT_API_KEY", "")}', + "Content-Type": "application/json", + } + req = urllib.request.Request(url, data=data, headers=headers, method="POST") + response = urllib.request.urlopen(req) + result = response.read() + return result.decode("utf-8") + + +files = {} +for file in Path(".").glob("**/*.md"): + with file.open() as f: + files[str(file)] = f.read() + +print(upload_files(files))