diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000000000000000000000000000000000000..8753f297b4fcd422bb21a31ec365d8b4c2768d67
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,29 @@
+name: PlatformIO CI
+
+on: [push, pull_request]
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v3
+    - name: Cache pip
+      uses: actions/cache@v2
+      with:
+        path: ~/.cache/pip
+        key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
+        restore-keys: |
+          ${{ runner.os }}-pip-
+    - name: Cache PlatformIO
+      uses: actions/cache@v2
+      with:
+        path: ~/.platformio
+        key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
+    - name: Set up Python
+      uses: actions/setup-python@v4
+    - name: Install PlatformIO
+      run: |
+        python -m pip install --upgrade pip
+        pip install --upgrade platformio
+    - name: Run PlatformIO
+      run: pio run
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..b9f3806a22867843e318587d52ca211f261d7ac5
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+.pio
+.vscode
diff --git a/README.md b/README.md
index f4c31eee557bb768d2dce36f04bc851edbbf6976..6c04e849845423f646f3f522bb7cac079a525419 100644
--- a/README.md
+++ b/README.md
@@ -46,6 +46,10 @@ Currently, it ignores all the respone codes, except when querying the chip.  But
 
 Anyone who wants to write a good/nice utility should probably look at the code in this folder.
 
+## VSCode + PlatformIO
+
+This project can also be built, uploaded and debugged with VSCode and the PlatformIO extension. See [here](https://github.com/Community-PIO-CH32V/platform-ch32v) for details.
+
 ## Quick Reference
  * Needed for programming/debugging: `SWIO` is on `PD1`
  * Optional (not needed, can be configured as output if fuse set): `NRST` is on `PD7`
diff --git a/platformio.ini b/platformio.ini
new file mode 100644
index 0000000000000000000000000000000000000000..4fef7dfdf01092fb98474b2ec276c385354a677e
--- /dev/null
+++ b/platformio.ini
@@ -0,0 +1,22 @@
+; see https://docs.platformio.org/en/latest/projectconf/index.html
+[platformio]
+src_dir = .
+include_dir = .
+
+[env]
+platform = https://github.com/Community-PIO-CH32V/platform-ch32v.git
+; or genericCH32V003A4M6 or whatever, see platform link
+board = ch32v003f4p6_evt_r0
+monitor_speed = 115200
+board_build.ldscript = ch32v003evt/ch32v003.ld
+build_flags = -flto -Ich32v003evt -lgcc
+; use a source filter to only build certain folders / files
+
+[env:blink]
+build_src_filter = +<ch32v003evt> +<examples/blink>
+
+[env:fulldemo]
+build_src_filter = +<ch32v003evt> +<examples/fulldemo>
+
+[env:ws2812demo]
+build_src_filter = +<ch32v003evt> +<examples/ws2812demo>