diff --git a/CHANGELOG b/CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,11 @@
+arduino-copilot (1.7.1) upstream; urgency=medium
+
+  * Added byteArray to serial modules, which allows outputting a
+    Stream of Arrays of bytes.
+  * Update to copilot-3.9.
+
+ -- Joey Hess <id@joeyh.name>  Sun, 08 May 2022 15:10:49 -0400
+
 arduino-copilot (1.7.0) upstream; urgency=medium
 
   * Added the Arduino data type, which replaces the PinId type used in the
@@ -17,7 +25,7 @@
 
 arduino-copilot (1.5.7) unstable; urgency=medium
 
-  * Update to copilot-3.7.
+  * Update to copilot-3.8.
 
  -- Joey Hess <id@joeyh.name>  Wed, 02 Feb 2022 11:07:53 -0400
 
diff --git a/Examples/Blink/stack.yaml b/Examples/Blink/stack.yaml
--- a/Examples/Blink/stack.yaml
+++ b/Examples/Blink/stack.yaml
@@ -3,13 +3,13 @@
 - '../..'
 resolver: lts-18.9
 extra-deps: 
-- sketch-frp-copilot-1.0.1
-- copilot-3.7
-- copilot-c99-3.7
-- copilot-core-3.7
-- copilot-language-3.7
-- copilot-libraries-3.7
-- copilot-theorem-3.7
+- sketch-frp-copilot-1.0.2
+- copilot-3.9
+- copilot-c99-3.9
+- copilot-core-3.9
+- copilot-language-3.9
+- copilot-libraries-3.9
+- copilot-theorem-3.9
 - ansi-terminal-0.9.1
 - bimap-0.3.3
 - language-c99-0.1.2
diff --git a/Examples/Button/stack.yaml b/Examples/Button/stack.yaml
--- a/Examples/Button/stack.yaml
+++ b/Examples/Button/stack.yaml
@@ -3,13 +3,13 @@
 - '../..'
 resolver: lts-18.9
 extra-deps: 
-- sketch-frp-copilot-1.0.1
-- copilot-3.7
-- copilot-c99-3.7
-- copilot-core-3.7
-- copilot-language-3.7
-- copilot-libraries-3.7
-- copilot-theorem-3.7
+- sketch-frp-copilot-1.0.2
+- copilot-3.9
+- copilot-c99-3.9
+- copilot-core-3.9
+- copilot-language-3.9
+- copilot-libraries-3.9
+- copilot-theorem-3.9
 - ansi-terminal-0.9.1
 - bimap-0.3.3
 - language-c99-0.1.2
diff --git a/Examples/ButtonHold/stack.yaml b/Examples/ButtonHold/stack.yaml
--- a/Examples/ButtonHold/stack.yaml
+++ b/Examples/ButtonHold/stack.yaml
@@ -3,13 +3,13 @@
 - '../..'
 resolver: lts-18.9
 extra-deps: 
-- sketch-frp-copilot-1.0.1
-- copilot-3.7
-- copilot-c99-3.7
-- copilot-core-3.7
-- copilot-language-3.7
-- copilot-libraries-3.7
-- copilot-theorem-3.7
+- sketch-frp-copilot-1.0.2
+- copilot-3.9
+- copilot-c99-3.9
+- copilot-core-3.9
+- copilot-language-3.9
+- copilot-libraries-3.9
+- copilot-theorem-3.9
 - ansi-terminal-0.9.1
 - bimap-0.3.3
 - language-c99-0.1.2
diff --git a/Examples/EEPROM/stack.yaml b/Examples/EEPROM/stack.yaml
--- a/Examples/EEPROM/stack.yaml
+++ b/Examples/EEPROM/stack.yaml
@@ -3,13 +3,13 @@
 - '../..'
 resolver: lts-18.9
 extra-deps: 
-- sketch-frp-copilot-1.0.1
-- copilot-3.7
-- copilot-c99-3.7
-- copilot-core-3.7
-- copilot-language-3.7
-- copilot-libraries-3.7
-- copilot-theorem-3.7
+- sketch-frp-copilot-1.0.2
+- copilot-3.9
+- copilot-c99-3.9
+- copilot-core-3.9
+- copilot-language-3.9
+- copilot-libraries-3.9
+- copilot-theorem-3.9
 - ansi-terminal-0.9.1
 - bimap-0.3.3
 - language-c99-0.1.2
diff --git a/Examples/EEPROMrange/stack.yaml b/Examples/EEPROMrange/stack.yaml
--- a/Examples/EEPROMrange/stack.yaml
+++ b/Examples/EEPROMrange/stack.yaml
@@ -3,13 +3,13 @@
 - '../..'
 resolver: lts-18.9
 extra-deps: 
-- sketch-frp-copilot-1.0.1
-- copilot-3.7
-- copilot-c99-3.7
-- copilot-core-3.7
-- copilot-language-3.7
-- copilot-libraries-3.7
-- copilot-theorem-3.7
+- sketch-frp-copilot-1.0.2
+- copilot-3.9
+- copilot-c99-3.9
+- copilot-core-3.9
+- copilot-language-3.9
+- copilot-libraries-3.9
+- copilot-theorem-3.9
 - ansi-terminal-0.9.1
 - bimap-0.3.3
 - language-c99-0.1.2
diff --git a/Examples/Random/stack.yaml b/Examples/Random/stack.yaml
--- a/Examples/Random/stack.yaml
+++ b/Examples/Random/stack.yaml
@@ -3,13 +3,13 @@
 - '../..'
 resolver: lts-18.9
 extra-deps: 
-- sketch-frp-copilot-1.0.1
-- copilot-3.7
-- copilot-c99-3.7
-- copilot-core-3.7
-- copilot-language-3.7
-- copilot-libraries-3.7
-- copilot-theorem-3.7
+- sketch-frp-copilot-1.0.2
+- copilot-3.9
+- copilot-c99-3.9
+- copilot-core-3.9
+- copilot-language-3.9
+- copilot-libraries-3.9
+- copilot-theorem-3.9
 - ansi-terminal-0.9.1
 - bimap-0.3.3
 - language-c99-0.1.2
diff --git a/Examples/SerialPort/stack.yaml b/Examples/SerialPort/stack.yaml
--- a/Examples/SerialPort/stack.yaml
+++ b/Examples/SerialPort/stack.yaml
@@ -3,13 +3,13 @@
 - '../..'
 resolver: lts-18.9
 extra-deps: 
-- sketch-frp-copilot-1.0.1
-- copilot-3.7
-- copilot-c99-3.7
-- copilot-core-3.7
-- copilot-language-3.7
-- copilot-libraries-3.7
-- copilot-theorem-3.7
+- sketch-frp-copilot-1.0.2
+- copilot-3.9
+- copilot-c99-3.9
+- copilot-core-3.9
+- copilot-language-3.9
+- copilot-libraries-3.9
+- copilot-theorem-3.9
 - ansi-terminal-0.9.1
 - bimap-0.3.3
 - language-c99-0.1.2
diff --git a/Examples/WaterHeater/stack.yaml b/Examples/WaterHeater/stack.yaml
--- a/Examples/WaterHeater/stack.yaml
+++ b/Examples/WaterHeater/stack.yaml
@@ -3,13 +3,13 @@
 - '../..'
 resolver: lts-18.9
 extra-deps: 
-- sketch-frp-copilot-1.0.1
-- copilot-3.7
-- copilot-c99-3.7
-- copilot-core-3.7
-- copilot-language-3.7
-- copilot-libraries-3.7
-- copilot-theorem-3.7
+- sketch-frp-copilot-1.0.2
+- copilot-3.9
+- copilot-c99-3.9
+- copilot-core-3.9
+- copilot-language-3.9
+- copilot-libraries-3.9
+- copilot-theorem-3.9
 - ansi-terminal-0.9.1
 - bimap-0.3.3
 - language-c99-0.1.2
diff --git a/TODO b/TODO
--- a/TODO
+++ b/TODO
@@ -32,6 +32,16 @@
   facilities for operating on Array are limited so it could be useful to
   have a Range interface too.
 
+* A single Sketch that has two writes to the same pin currently results
+  in C code that indeed writes twice per loop. This is somewhat surprising,
+  undocumented, and perhaps breaks the FRP-like behavior. It would be possible
+  to prevent multiple writes to the same pin in a Sketch (already done for
+  dissimilar uses of the same pin), but that is complicated by combining
+  two Sketches with if/then/else or whenB or similar, that both write to
+  the same pin, but not actually at the same time.
+  	whenB foo (led =: false) >> whenB bar (led =: true)
+  Which should be legal at least when foo /= bar.
+
 * The way serial output works is somewhat unsatisfying, because
   it does not take a Stream FormatOutput. So the Copilot DSL can't be used
   to adjust the output format as the arduino runs; it's fixed at compile
diff --git a/arduino-copilot.cabal b/arduino-copilot.cabal
--- a/arduino-copilot.cabal
+++ b/arduino-copilot.cabal
@@ -1,5 +1,5 @@
 Name: arduino-copilot
-Version: 1.7.0
+Version: 1.7.1
 Cabal-Version: >= 1.10
 License: BSD3
 Maintainer: Joey Hess <id@joeyh.name>
@@ -114,10 +114,10 @@
     Copilot.Arduino.Main
   Build-Depends:
     base (>= 4.5 && < 5),
-    sketch-frp-copilot (== 1.0.1),
-    copilot (== 3.7.*),
-    copilot-c99 (== 3.7.*),
-    copilot-language (== 3.7.*),
+    sketch-frp-copilot (== 1.0.2),
+    copilot (== 3.9.*),
+    copilot-c99 (== 3.9.*),
+    copilot-language (== 3.9.*),
     filepath,
     directory,
     mtl,
diff --git a/src/Copilot/Arduino/Library/Serial.hs b/src/Copilot/Arduino/Library/Serial.hs
--- a/src/Copilot/Arduino/Library/Serial.hs
+++ b/src/Copilot/Arduino/Library/Serial.hs
@@ -14,6 +14,7 @@
 	show,
 	showFormatted,
 	byte,
+	byteArray,
 	noInput,
 	SerialDevice,
 	FormatOutput,
diff --git a/src/Copilot/Arduino/Library/Serial/Device.hs b/src/Copilot/Arduino/Library/Serial/Device.hs
--- a/src/Copilot/Arduino/Library/Serial/Device.hs
+++ b/src/Copilot/Arduino/Library/Serial/Device.hs
@@ -23,6 +23,7 @@
 import Data.List
 import Data.Maybe
 import Data.Proxy
+import GHC.TypeNats
 import qualified Prelude
 
 -- | Eg \"Serial\" or \"Serial2\"
@@ -181,6 +182,14 @@
 byte :: Stream Int8 -> FormatOutput
 byte s = FormatOutput
 	(Just (arg s))
+	(Just (showCType (Proxy @Int8)))
+	(\(SerialDeviceName devname) v ->
+		CLine $ devname <> ".write(" <> v <> ");")
+
+-- | Write an array of bytes to the serial port.
+byteArray :: KnownNat n => Stream (Array n Int8) -> FormatOutput
+byteArray arr = FormatOutput
+	(Just (arg arr))
 	(Just (showCType (Proxy @Int8)))
 	(\(SerialDeviceName devname) v ->
 		CLine $ devname <> ".write(" <> v <> ");")
diff --git a/src/Copilot/Arduino/Library/Serial/XBee.hs b/src/Copilot/Arduino/Library/Serial/XBee.hs
--- a/src/Copilot/Arduino/Library/Serial/XBee.hs
+++ b/src/Copilot/Arduino/Library/Serial/XBee.hs
@@ -15,6 +15,7 @@
 	show,
 	showFormatted,
 	byte,
+	byteArray,
 	noInput,
 	SerialDevice,
 	FormatOutput,
diff --git a/stack.yaml b/stack.yaml
--- a/stack.yaml
+++ b/stack.yaml
@@ -2,13 +2,13 @@
 - '.'
 resolver: lts-18.9
 extra-deps:
-- sketch-frp-copilot-1.0.1
-- copilot-3.7
-- copilot-c99-3.7
-- copilot-core-3.7
-- copilot-language-3.7
-- copilot-libraries-3.7
-- copilot-theorem-3.7
+- sketch-frp-copilot-1.0.2
+- copilot-3.9
+- copilot-c99-3.9
+- copilot-core-3.9
+- copilot-language-3.9
+- copilot-libraries-3.9
+- copilot-theorem-3.9
 - ansi-terminal-0.9.1
 - bimap-0.3.3
 - language-c99-0.1.2
