Read HAL pin in Python

  • JT
  • JT's Avatar Topic Author
  • Away
  • Administrator
  • Administrator
More
17 Oct 2024 11:51 #312366 by JT
Read HAL pin in Python was created by JT
Is it possible to read a HAL pin in Python? I can make and set HAL pins of type HAL_OUT and make a S32 HAL_IN pin but I'm not figuring out how to read the value of that pin. I can also setp in the post gui file and change it's value.

JT

Please Log in or Create an account to join the conversation.

  • JT
  • JT's Avatar Topic Author
  • Away
  • Administrator
  • Administrator
More
17 Oct 2024 12:05 #312368 by JT
Replied by JT on topic Read HAL pin in Python
Actually I think I've solved it and will update this when I've proven it out. But for now it looks like
import hal
hal.get_value('some-pin-name')

JT

Please Log in or Create an account to join the conversation.

  • JT
  • JT's Avatar Topic Author
  • Away
  • Administrator
  • Administrator
More
17 Oct 2024 12:44 #312374 by JT
Replied by JT on topic Read HAL pin in Python
Yup it works


JT
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum