We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 82c501c commit 6e7b2dfCopy full SHA for 6e7b2df
controller/rpc_client.go
@@ -3,6 +3,7 @@ package main
3
import (
4
"context"
5
"encoding/json"
6
+ "fmt"
7
"log"
8
"math"
9
"strconv"
@@ -46,7 +47,8 @@ func main() {
46
47
48
if module.Name == "raspberrypi-0" {
49
var obj Dht11
- err = json.Unmarshal([]byte(res), &obj)
50
+ jsonString := string(fmt.Sprintf("`%s`", res))
51
+ err = json.Unmarshal([]byte(jsonString), &obj)
52
if err != nil {
53
log.Fatalf("error: %v", err)
54
}
modules/raspberrypi5/devices/dht11/app/main.py
@@ -12,6 +12,7 @@
12
dhtDevice = _device(_board)
13
14
try:
15
+
16
d = dict();
17
18
d['t'] = dhtDevice.temperature
0 commit comments