[SOLVED] Error 500 when trying to flash code that uses I2C

Continuing the discussion from Error 500 when trying to flash Raspberry Pi 3:

I have a RPi 2 B, and this is still happening — firmware target set to 0.5.1-pi.11, latest particle-agent, system is up to date (apt-get update/upgrade), fresh reboot, I2C enabled. Using the SparkFun BME280 library, which doesn't seem to have any weird dependencies. Works fine with a super simple app that doesn't use I2C. As soon as I2C is called in the app, I instantly see "Error 500" when trying to flash. What exactly does 500 mean in this context? Is there any way to be provided more specific error messages?

I may have stumbled on why this is not working… it looks like the SF BME280 library also allows communication over SPI, which may not be enabled yet in the RPi firmware… I’m going to make a variation that does not support SPI to confirm. Stand by…

[edit] Solved, looks like removing all use of SPI from the library allowed the firmware to be “flashed”. I2C is working nicely now!

3 Likes

Great. Thanks for the update!

1 Like