Skip to content

Commit 68a02c9

Browse files
authored
Update README.md
1 parent f3c9c33 commit 68a02c9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ def on_open(ws):
103103
print("connected")
104104

105105

106-
def connect(sensor_type):
107-
ws = websocket.WebSocketApp(f"ws://192.168.0.102:8081/sensor/connect?type={sensor_type}",
106+
def connect(url):
107+
ws = websocket.WebSocketApp(url,
108108
on_open=on_open,
109109
on_message=on_message,
110110
on_error=on_error,
@@ -113,8 +113,11 @@ def connect(sensor_type):
113113
ws.run_forever()
114114

115115

116-
connect("android.sensor.accelerometer")
116+
connect("ws://192.168.0.101:8080/sensor/connect?type=android.sensor.accelerometer")
117+
117118
```
119+
*Your device's IP might be different when you tap start button, so make sure you are using correct IP address at client side*
120+
118121
## Real Time plotting
119122
See [Real Time Plot of Accelerometer (Python)](https://github.com/umer0586/SensorServer/wiki/Real-Time-Plot-Example-(-Python)) using this app
120123

0 commit comments

Comments
 (0)