Hi,
Sorry for my late response, I was waiting for the robot to arrive.
DeltaX can be controlled by Python (I’m using Visual Studio Code) to control. It appears to use Gcodes command. Here is a simple code just to move the head:
#Windows OS
#install: pip install pyserial
import serial
import time
ser = serial.Serial('COM7',115200, timeout = 1) # open serial port
time.sleep(2)
print(ser.readline())
gcodes = []
gcodes.append('G28')
gcodes.append('G01 Z-320')
gcodes.append('G01 X-100')
gcodes.append('G01 Z-350')
gcodes.append('G01 Z-320')
gcodes.append('G01 X100')
gcodes.append('G01 Z-350')
gcodes.append('G01 Z-320')
gcodes.append('G01 X100 Y100')
gcodes.append('G01 Z-350')
gcodes.append('G01 X-100 Y-100 Z-320')
gcodes.append('G01 Z-350')
gcodes.append('G28')
for gcode in gcodes:
print(gcode)
gcodeLine = gcode + '\n'
ser.write(gcodeLine.encode())
while 1:
response = ser.readline()
print(response)
if (response.find('Ok'.encode()) > -1):
break
ser.close()
My initial project’s aim is to pick up all the Tic Tac mints scattered and place them in a cup. Currently, I am connecting H7 Plus to the pc using USB cable and example codes such as Blob_tracking and find_Circle appear to work.
However, I haven’t managed to transferred the data to VS Code.
A few questions I have not managed to find the answers to:
-
Do I have to use OpenMV IDE to access the H7 plus? Can I modify your example codes to work in Visual Studio Code python?
-
If I have to use OpenMV IDE, I need to transfer/print the blob X Y coordinates of each Tic Tac to a PC and the using VS Code Python to read the data. You have mentioned in the forum that the port needs to be closed. How? Can you share a short codes: OpenMV IDE and VS Code that demo this behaviour?
3, Other suggestions?
Thank you for you time.
Eric