I just finished modifications to the sim code to enable it to run on the BeagleBone Blue single board computer. On the bench, it works okay, with a few small issues. I have it running with an SBUS receiver, external mag, and gps. The adc is reading battery voltage. I'm running at 500 Hz loop rate, ESCs are at 400 Hz update rate. The BeagleBone Blue is nt as powerful as the RPI3, it's loading the single core CPU at about 48%.
The 2 issues I'm seeing are:
1)Occasionally the sensor status will go from green to red. It's fairly infrequent, and doesn't seem to cause any obvious issues. I think this is being caused by the unfortunate fact that the MPU9250 on this board is communicating by I2C rather than SPI. If I can figure out how to change the BeagleBone Blue I2C clock, I may try overclocking the MPU9250 I2C and see if that helps some. SPI is broken out to external pins, could get an MPU9250 braekout board that talks SPI......
2)The event status is toggling between green and yellow fairly regularly. I'm connected to the BeagleBone Blue over Wifi, that may have something to do with it, I'm not 100% sure. I may try a direct serial connection to see if that helps any.
For those interested, the code is at:
and the command line to execute the code is:
sudo ./build/sim/sim.elf -r -b -g 117 -m 0 -I /dev/i2c2-2 -i mpu9250:0 -i bmp280:0 -I /dev/i2c-1 -i hmc5883:1 -S gps:/dev/ttyS2
There may be better ways to implement some of this, comments welcome. I have a beater quad that I'm going to install this on for testing, maybe this weekend.
I should add I made use of the PRU code and other utilities used by the ArduPilot BeagleBone Blue target in this effort.