How to send real-time sensor data to PC from Raspberry Pi Zero?
问题 I've written a Python3 script which runs on Raspberry Pi Zero W that collects data from an IMU sensor (MPU9250) and creates 3 different angle values; roll, pitch, yaw. Which looks like this: def main(): while True: dataAcc = mpu.readAccelerometerMaster() dataGyro = mpu.readGyroscopeMaster() dataMag = mpu.readMagnetometerMaster() [ax, ay, az] = [round(dataAcc[0], 5), round(dataAcc[1], 5), round(dataAcc[2], 5)] [gx, gy, gz] = [round(dataGyro[0], 5), round(dataGyro[1], 5), round(dataGyro[2], 5)]