I've been using python to try to access the battery state on a metamotion c, but nothing seems to be working.
I am wondering if the function "get_battery_state_data_signal" only works for metamotion r?
I am not sure if it is an issue.
I am just wondering if I am doing something incorrect in my code (which is very likely).
When I try to add the function, I am not getting any errors, but I am not getting any print output either, so I'm just a bit confused regarding how to call that function.
I think Eric is asking you to share code and more details. There is so little information in your post I might have to delete this entire thread.
Sorry, here is more information
I have attached a txt file of my code.
I try to print the battery voltage with print(BatteryState.voltage).
But the output is "Field type=c_ushort, ofs=0, size=2"
How do I obtain the actual value of the voltage?
This is explained in the tutorials and documentation.
Oh sorry about that, I didn't find the page on readable signals.
That makes a lot more sense.