Fix typo in code sample (#2063)
This commit is contained in:
parent
e09e830d4b
commit
61562b45bd
|
@ -20,7 +20,7 @@ temperature multiplied with 10 (integer)
|
||||||
```lua
|
```lua
|
||||||
local sda, scl = 1, 2
|
local sda, scl = 1, 2
|
||||||
i2c.setup(0, sda, scl, i2c.SLOW) -- call i2c.setup() only once
|
i2c.setup(0, sda, scl, i2c.SLOW) -- call i2c.setup() only once
|
||||||
hmc58831.setup()
|
hmc5883l.setup()
|
||||||
local x,y,z = hmc5883l.read()
|
local x,y,z = hmc5883l.read()
|
||||||
print(string.format("x = %d, y = %d, z = %d", x, y, z))
|
print(string.format("x = %d, y = %d, z = %d", x, y, z))
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue