- added motor control

git-svn-id: http://moon:8086/svn/projects/HendiControl@29 fda53097-d464-4ada-af97-ba876c37ca34
This commit is contained in:
2019-02-27 19:49:14 +00:00
parent 6ab62bf658
commit a22ffe8384
2 changed files with 18 additions and 0 deletions
+2
View File
@@ -85,3 +85,5 @@ print("R={:.3f} Ohm, T={:.2f} degC".format(R, T))
for i in range (0, 8): for i in range (0, 8):
print("Reg[0x{}]: 0x{:02X}".format(i, read_reg(i))) print("Reg[0x{}]: 0x{:02X}".format(i, read_reg(i)))
print("End of program")
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/python
import serial
import time
import os
# Open serial
# Main
with serial.Serial("/dev/ttyACM0", 115200, timeout=1) as ser:
ser.write("V\n")
s = ser.readline()
print (s)
print("End of program")