Any examples of something similar? Hopefully I can get my corporate overlords to allow me to open source my efforts once ready for general consumption.
That part was easy enough to find. The next part is the Carloop design, which is not quite so easy to find, but is on GitHub here:
In comparing the two, the pins for the ‘SPI’ Object are A2-A5 and are not used by Carloop. These pins are all available and you can use it to do SPI, so this should be quite easy.
Looking more closely, there is a design in work for a CarloopXL, which uses SPI for a SD Card. If that design eventually comes out, you would have to use multiple chip select lines (SPI-SS) for each device, such as A2 already used for the SD Card, plus some other available pin (D6 maybe to select your SPI display device).
One thing to keep in mind with your design is the performance. You will need to experiment to see how busy the Photon is taking care of the CANbus and the SPI to see if the performance is fast enough. It may be okay. If you are looking at performance issues, using CAN filters (see the Photon documentation) can help reduce the Photon workload in taking care of the CANbus.
I was successful in using an Adafruit 1.5" OLED display via SPI. It was good enough that I have since moved on to a 4d Systems 7" display, connected via Serial1 (hope I never need gps…). Performance of this configuration is not as it needs to be, but it has less to do with the data interface and more to do with how the screen’s messaging is implemented: You have to wait for the screen to send back an ACK byte, which takes 25-32 milliseconds per widget with no bulk/batch update API. I’m still working with them to try to find a higher refresh rate option, as I’d like 6-8 visualizations with smooth animation, and it’s visibly choppy just with 4.
The Photon is an outstanding piece of hardware, and I’m even driving the non-touch “SuperBright” 7" display straight from the vIN pin on the Photon. Can’t wait to resolve the performance issue and get this thing in my dashboard!
On the particle forums, there are threads on the topic of using 4D displays. I think peekay123 is one of the experts there.
Take a look among these postings to see if you can improve the performance of your display:
Well, after writing a new display stack, a new 4d systems library and several python programs for post-processing images & metadata we have a complete Carloop integration with a Link ECU in a 1987 Toyota MR2. It’s smooth enough for me
Most of the integration is under a dashboard, really difficult to photograph. I packaged the Photon and Carloop into a plug-in box though, maybe that’s interesting? I would have loved to have just holes rather than an OBD2 connector, as I could have made the same thing more compact and with 1 connector rather than 2.
Well, I had to add that. I rewired the engine to use a Link G4+ Monsoon and programmed the CAN messages to ship all that data and lots more up front. It’s a little more technical than when it rolled off the line 3 decades ago!