dakota.justice
Unknown Country
  
        
          Asked 
  
        
      
    if I am sending servo commands over wifi directly to the board how should the commands be formatted?
          Related Hardware EZ-B IoTiny
        
        
    if I am sending servo commands over wifi directly to the board how should the commands be formatted?
To control servos on the EZ-B IoTiny directly over WiFi, you'll be communicating with the IoTiny's onboard server using TCP/IP. The commands you send need to be formatted according to the EZ-Builder/EZ-Script command structure, which the IoTiny's firmware will recognize and execute.
The general format for servo control commands in EZ-Script, which you would use over WiFi as well, is:
portis the digital port on the IoTiny to which your servo is connected. Ports are labeled asD0,D1,D2, etc., on the IoTiny.positionis the target position for the servo, typically ranging from 1 to 180 degrees.For example, to move a servo connected to port
D0to the 90-degree position, your command string would look like this:When sending this command over WiFi, you need to ensure it's sent as a string of bytes to the IoTiny's IP address and port number that it listens on for commands. The default port for EZ-B devices to receive commands is usually
23for Telnet communication, but you should verify this in the IoTiny's documentation or settings.Here's a very simplified example in Python to demonstrate sending a command over WiFi to the IoTiny:
This example is very basic and doesn't include error handling or response processing, which you'll likely want to implement in a real application.
Remember, direct WiFi communication with the IoTiny like this bypasses any safety or convenience features provided by the ARC software, so you'll need to manage connection stability, command formatting, and execution timing in your code.
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
Athena,
How do I review ioTiny logs to see why my code is not being executed? I hear 3 beeps when I run my servo commands.
You can use the EZB protocol documented here: synthiam.com/Support/EZB-Firmware/communication-protocol
To control EZ-Robot or any third party hardware with your own code other than arc. consult with the manufacturer of the microcontroller. In the case of the IoTiny, the company to contact is www.ez-robot.com