I am trying to use JSON over TCP as described here.
I start the Protee Golf Interface, then TGC as I normally would.
I have made a simple program that attempts to send the sample data to port 1933 using the Python Requests module, but I get Error 10061 - No connection could be made because the target machine actively refused it. I am not much of a programmer, but could somebody or ProTee United give me a hint as to what I am doing wrong? Or an example Python script that is able to send data to the Protee Golf Interface would work as well. I have attached a photo of the error and my code is below.
I start the Protee Golf Interface, then TGC as I normally would.
I have made a simple program that attempts to send the sample data to port 1933 using the Python Requests module, but I get Error 10061 - No connection could be made because the target machine actively refused it. I am not much of a programmer, but could somebody or ProTee United give me a hint as to what I am doing wrong? Or an example Python script that is able to send data to the Protee Golf Interface would work as well. I have attached a photo of the error and my code is below.
Code:
import requests import json url = "http://localhost:1933" payload = {"protocol":"GenericTCP", "info":{"device":"UNKNOWN", "version":"1.0.0", "club":"false", \ "ball":"true", "spin":"true"}, "data":{"counter":"0", "shotnumber":"0", "clubspeed":"0",\ "swingpath":"0", "clubface":"0", "facerelative":"0", "sweetspot":"0", "ballspeed":"10.0", \ "launchangle":"25.4", "ballpath":"3", "backspin":"3000", "sidespin":"-300", "axis":"2", \ "carry":"0"}} r = requests.post(url, data=json.dumps(payload)) cv2.waitKey(0)[ATTACH=JSON]{"data-align":"none","data-size":"full","title":"Error.jpg","data-attachmentid":190431}[/ATTACH]
Comment