Last active
August 29, 2015 14:26
-
-
Save NanorPiwik/bbebe1b9e7837df89ad2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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