Python to Kodular

Hello everyboy.
please I need your help.
Somebody can tell me how can I do this phyton code in Kodular.
Thanks in advance.

if data_block_type == b'\x51':
  # Read 9 byte block
  ax_l = self.sock.recv(1)
  ax_h = self.sock.recv(1)
  ay_l = self.sock.recv(1)
  ay_h = self.sock.recv(1)
  az_l = self.sock.recv(1)
  az_h = self.sock.recv(1)
  t_l = self.sock.recv(1)
  t_h = self.sock.recv(1)
  self.sock.recv(1) # Check sum, ignore
  self.acc_x = struct.unpack("<h", ax_l + ax_h)[0] / 32768.0 * 16.0
  self.acc_y = struct.unpack("<h", ay_l + ay_h)[0] / 32768.0 * 16.0
  self.acc_z = struct.unpack("<h", az_l + az_h)[0] / 32768.0 * 16.0

You can’t. You might be able to do it in Java and make an extension for it, but in kodular you can’t.

Maybe tell what this code does and what you are trying to achieve.

7 Likes

Please Change The Phyton to Python

This post was flagged by the community and is temporarily hidden.

Is this anyway related to this topic :eyes:

4 Likes

Why don’t you try these codes with Kivy, PyQt? These are the python packages you can use to create android apps. :grimacing:

1 Like

Thanks, I am gonna try it.

1 Like