diff --git a/scripts/run-format.sh b/scripts/run-format.sh
index 29341cbbe308c9f1c63de6f618279b9ed2594b56..c193219b990e2402978a0000d064dbff7a367f6e 100755
--- a/scripts/run-format.sh
+++ b/scripts/run-format.sh
@@ -10,7 +10,7 @@ SOURCE_DIR=$(dirname "$0")/..
 
 #Directories that must be excluded from formatting. These paths are
 #relative to SOURCE_DIR.
-EXCLUDE_DIRS=(external build CMake)
+EXCLUDE_DIRS=(external build CMake arduino/PowerSensor arduino/PowerSensor3)
 
 #The patterns of the C++ source files, which clang-format should format.
 CXX_SOURCES=(*.cpp *.h)