From 010b3c37cce31b9a8686aa8c6efc02277236c7ee Mon Sep 17 00:00:00 2001 From: peter madsen Date: Fri, 13 Oct 2023 18:26:12 +0200 Subject: [PATCH] update i2c_example.erl for i2c changes i2c:read_bytes returns ok tuple in new api --- erlang/i2c_example/src/i2c_example.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erlang/i2c_example/src/i2c_example.erl b/erlang/i2c_example/src/i2c_example.erl index 6dc17b1..11c13de 100644 --- a/erlang/i2c_example/src/i2c_example.erl +++ b/erlang/i2c_example/src/i2c_example.erl @@ -36,7 +36,7 @@ loop(I2C) -> loop(I2C). read(I2C) -> - Bin = read_sensor(I2C), + {ok, Bin} = read_sensor(I2C), parse_bin(Bin). parse_bin(B) ->