Design docs / Source code intro?

I want to dive into the source code for my BrewPi Spark 2. First of all, I want to better understand some of the features and algorithms, then I want to customize it for my use case.

Are there any design/architecture overviews available?
Are there any docs to help me get a dev environment up & running?
Any docs that give a quick overview of the source tree?

It looks like the main code I’m interested in is in firmware/app/controller … but I don’t see a main() so I’m not sure where the entry point is (I haven’t spent a lot of time-- I should be able to figure this out). I’ve done lots of C/C++ programming, though its been a while. I haven’t done anything with the Spark/Photon so any tips to ramp up my learning curve will be appreciated.

Basically, I’m just going to use my BrewPi to monitor & control the temperature in my wine cellar, with an alarm when it gets too low or too high. This is pretty basic, but I’m thinking of using two thermometers at different locations in the cellar and having it turn fans on/off when the temp differential grows. Then it would be cool to use the touch screen as a light switch to turn the lights on & off.

If you have any tips to get a newbie up & running with the code, it would be appreciated. If anything I write ends up being useful I’d be more than happy to contribute it back as well.

Thanks,
Eric

I found this guide for getting a photon dev environment going:
https://learn.sparkfun.com/tutorials/photon-development-guide/arm-gcc-and-the-dfu-bootloader-offline

It looks like this is applicable here… I assume I should be able to leverage this in my BrewPi-installed photon?

Thanks,
Eric

Hi Eric,

I use Eclipse myself. The source has an eclipse project file included.
You’ll also need to install boost (boost.org) and the arm toolchain.

I’ll send you my Skype details in a PM. It would be great if you could set up the dev environment from scratch while taking notes. I’ll assist you via Skype. That will be a lot easier for me than remembering all the steps.

Cheers

That sounds like a good idea. Does this need to be on a Windows machine? (I’m running on a mac, but also have a PC).

I’m currently away from home- when I get back I’ll coordinate a Skype session with you. Thanks for the help and I’m glad to document the process for the community.