Pin Mapping for the Pro Micro (Leonardo)

I’ve dived straight into the deep end here for my first go at a BrewPi.

I’m trying to use BrewPi as a cheap way of making a web controlled large sous vide machine (immersion circulator). About 100L, which i’ll be using to bulk cook large bits of meat.

I already had a Raspberry Pi model B and a sparkfun pro micro in my collection of bits & bobs, so i thought i could set up BrewPi and use fridge constant or beer constant to hold the temperature.

So far i’ve got the legacy version running on the raspberry pi, and i have the 2.10 leonardo rev C firmware hex file running on my pro micro. Both the pro micro and the leonardo use the same microcontroller, so that’s not been an issue.
The raspberry pi communicated with the pro micro without issue.

However the pin mapping for the leonardo and pro micro is different and i want to be able to attach the following to it:
1 x DS18B20 sensor
1 x 25A SSR
1 x rotary encoder (with push button)
1 x 20x4 LCD (standard parallel interface)

Pin mapping:
Leonardo Pinmap
Pro Micro pinmap

My question is:
Can i change the pin mapping? Is this done by editing the python file brewpi-script/ in the raspberry Pi?

The default pins for the rev c in that python file do not appear to agree with the rec C DIY guide here:

How can i add an LCD? can i use a normal parallel interface or do i need to purchase a serial or i2c converter?
If so, how do i map these LCD pins?

Cheers for any help!

If you want to use different pins, you will need to change and recompile the firmware (from the 0.2.10 tag) and on top of that change

We cannot offer support for this. When recompiling the firmware, you might run into difficulties because we did not use the normal Arduino environment and used Atmel Studio and a makefile to compile for Arduino.

The LCD display was driven with a shift register on a custom LCD backpack. Some people have used an I2C display with custom firmware. But again, you’ll have to modify the code and recompile yourself.

Buying a leonardo is probably easier, but still not recommended for sous vide.

On the BrewPi Spark (NOT Arduino based) we support controlling a heater with PWM, which will be much more suitable for sous vide cooking, as it can run the heater at less than full power. I have used it a lot for sous vide myself. It will work out of the box. On the Arduino, it’s either fully ON or fully OFF.

On the Arduino we have minimum heating times which will be too long for your application. Another factor that you will have to change your self in the firmware.

So your choice is to use a BrewPi Spark and get support, or use a Leonardo or Pro Micro and do it on your own.

Excellent, thank you.

Just found Pins.h for the arduino, and of course already found on the raspberry pi.

I understand this is a much older version than whats currently offered, so thank you for helping at all.
I’m hoping that because the 100L water bath is such a large thermal mass, that the slow windowtime for the heater will be suitable. If it doesn’t work, i’ve already created a working sous vide program for arduino with a nice user interface, but it’s lacking the fantastic web GUI that brewpi has, so i’ll give it a shot! even if it’s not the easy way of doing things.

I’ll have a go at building the arduino firmware on atmel studio and see how it goes.

I found the link within Main.cpp to the resource
Managed to retrieve it from the internet archive so i could give it a shot.

Followed the instructions but end up getting an error 9009 for the executable nm.exe which is trying to make the AvrSize file.
Any idea where i’ve gone wrong?

My current guess is its either because i’m using studio 7 instead of 6, or perhaps its something do with it being a 64 bit installation.

You can skip that step. You don’t need to asses the file size so you can remove the use of nm.exe. It is not needed for compiling.


I have a hex file. Thank you very much for your help.

For anyone reading this in the future, you can find how to set up the environmental variable here:

And to skip the avr-size.txt error go into the properties of the brewpi-avr solution within atmel studio and then the “build events” tab and remove the command from the “post-build event command line” box.
which looks like this:
$(ARDUINO_HOME)\hardware\tools\avr\avr\bin\nm --demangle --size-sort --print-size -r -td “$(OutputDirectory)$(OutputFileName)$(OutputFileExtension)” > $(OutputDirectory)\avr-size.txt

Do you mind sharing the hex file and pinout? I have a Pro Micro and just realized there is no A4 for one wire :-).


I also have a Leonardo Pro Micro with no A4 pin. Following this thread I was able to change pins.h (changed A4 to A3 for the rev C shield), got a hex file from Atmel Studio, and successfully flashed the Arduino. I then changed the file to match my new onewire pin. Connected a one wire sensor, rebooted, and tried to add a device. I keep getting “No installed devices found”. Am I missing something?