Skip to content

Instantly share code, notes, and snippets.

@NanorPiwik
Last active August 29, 2015 14:26
Show Gist options
  • Save NanorPiwik/bbebe1b9e7837df89ad2 to your computer and use it in GitHub Desktop.
Save NanorPiwik/bbebe1b9e7837df89ad2 to your computer and use it in GitHub Desktop.
import serial, httplib2, uuid
arduino = serial.Serial('/dev/ttyACM0', 9600)
while True:
data = arduino.readline()
print data
h = httplib2.Http("my-domain.com")
resp, content = h.request("http://my-domain.com/piwik/piwik.php?idsite=1&rec=1&action_name=Entree-magasin&uid="+str(uuid.uuid4())+"&e_c=entree-magasin&e_a=passage&e_n=taille&e_v="+str(data), "GET")
print resp, content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment