storborg / witmotion

Other
15 stars 12 forks source link

HWT905 RS-485 sensor return None values only #3

Open jalpa91 opened 2 years ago

jalpa91 commented 2 years ago

Hi,

I am new to sensors. Hardware : ubuntu 20 , HWT905 RS485 ,python3

Successfully install witmotion and After using python API I tried to run a very basic python program and I always get None value only. could you please help me out with how to get raw data from the sensor?

sample code

from witmotion import IMU

def callback(msg): print('msg',msg) print(msg.get_angle())

print(msg.get_acceleration())

imu = IMU()

imu.subscribe(callback)

imu.get_quaternion() print(imu.get_angle()) print(imu.get_acceleration())

print(imu.get_quaternion())

Output of the program :

python3 gps_sensor_test.py

(None, None, None) None None

jpeg2600 commented 2 years ago

@jalpa91 have you managed to get it to work ? I'm wondering if the library works with RS485 sensors

Sumpy1 commented 1 year ago

Hey, I am using HWT905-TTL sensor but it just outputs 'None' when I try to output data through polling interface. Data does print when I used callback but it does not print timestamp and gives angular_velocity data as null. Also when I try to save the data collected from callback, it will save nothing. Any updates on this topic will be helpful.

TheNewRobot commented 10 months ago

Does anyone have an update for this problem? I have the exact same problem as sumpy1.