Skip to content

HWT905 RS-485 sensor return None values only #3

@jalpa91

Description

@jalpa91

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions