Commit fa8963a52954b8670adb90fe56c6aa0db2d1769b
1 parent
66c7a364
modif
Showing
1 changed file
with
0 additions
and
16 deletions
Show diff stats
Rpi_to_server.py deleted
@@ -1,16 +0,0 @@ | @@ -1,16 +0,0 @@ | ||
1 | -#!usr/bin/env python | ||
2 | - | ||
3 | -import serial | ||
4 | -from lxml import etree | ||
5 | - | ||
6 | -xml = etree.parse('111-1.xml') | ||
7 | - | ||
8 | -ser = serial.Serial("/dev/ttyACM0", 9600, timeout=1) | ||
9 | -value = ser.readline() | ||
10 | - | ||
11 | -for parametre in xml.getchildren(): | ||
12 | - if 'name' in parametre.attrib and parametre.attrib['name'] == 'data': | ||
13 | - parametre.text = value | ||
14 | -with open('111-1.xml', 'w') as myFile: | ||
15 | - myFile.write(etree.tounicode(xml)) | ||
16 | -myFile.close |