Australia
Asked — Edited
Resolved Resolved by DJ Sures!

How To Write A Code To Save The Servo Data As Text With Timestamps?

Hi I am trying to write a code for JD Humanoid where I can track the data coming from the servo. First I tried to write the following ode with EZ-Script. It serves my initial purpose but I also need a proper timestamp in "ddmmyyyyhhmmssffff" format. Apparently it seems that I can't do it with EZ-Script. So, I am thinking to write a similar code in Python as I can make the required timestamp formatting there. So, can anyone help me with this? Thanks.

ControlCommand("Graphy", RemoveAllSeries)

:loop

$pos0 = getservo(d0)
ControlCommand("Graphy", AddData, "Servo D0", $pos0)

$pos1 = getservo(d1)
ControlCommand("Graphy", AddData, "Servo D1", $pos1)

controlCommand("Camera", "CameraMovementTrackEnable")
ControlCommand("Graphy", AddData, "Servo D4", $pos)

FileWriteLine("c:\temp\mylog.txt", $time + ", servo D0: " + $pos0 + ", servo D1: " + $pos1)

sleep(10)

goto(loop)

Related Hardware JD Humanoid
Related Control Graphy

ARC Pro

Upgrade to ARC Pro

Get access to the latest features and updates before they're released. You'll have everything that's needed to unleash your robot's potential!

Author Avatar
Australia
#9  

Thanks a lot. Now I can extract the data just as I wanted!