In my last build, i had a lot of problems with LCD errors from the 78HC595 shift register, so i had to look for an alternative.

brewpi_i2c_1

I found the post from vasco on the BrewPi Forum:

http://forum.brewpi.com/discussion/1146/i2c-lcd-display-again

Vasco already done all the work and you can download the hex file from the link above.

Update: Daniel made an new Version of the Software, i could not test it yet because I’m using the original brewpi. You can find tit here.

I updated my schematics for the I2C display:

brewpi_i2c_2 brewpi_i2c_3

Parts List:

Bluetooth 4.0 USB Module [Amazon][Ebay]
Bluetooth-Serial Module HC06 or HC05 [Amazon][Ebay]
Arduino Pro mini (with quarz)[Amazon][Ebay]
Temp Sensors ds18b20[Amazon][Ebay]
I2C Display 20×4 [Amazon][Ebay]
Double Arduino Relay [Amazon][Ebay]
Rotary Encoder [Amazon][Ebay]
Universal Board 5x7cm [Amazon][Ebay]
Raspberry Pi [Amazon][Ebay]
Raspberry Case [Amazon][Ebay]
USB Wifi Adapter (get one that works)[Amazon][Ebay]
8GB MicroSD Card [Amazon][Ebay]
Male Headers [Amazon][Ebay]
Female Headers [Amazon][Ebay]
4x 0.1uF Capacitor [Amazon][Ebay]
1uf Capacitor [Amazon][Ebay]
3x 10k Resistor [Amazon][Ebay]
1k Resistor [Amazon][Ebay]
2k Resistor [Amazon][Ebay]
7805 DC-DC Converter [Amazon][Ebay]

Depending on the LCD register you are using, there is a different I2C address.

After double checking with Arduino I2C scanner i found that mine was 0x27 so i had to recompile from source on the raspberry pi.

mkdir ~/src
cd ~/src
git clone https://github.com/slintak/brewpi-avr.git
git checkout feature/IICdisplay
git pull
vim ConfigDefault.h

#define BREWPI_IIC 1 // LCD display connected to I2C.
// #define BREWPI_OLED 1
// #define BREWPI_SHIFT_LCD 1

vim DisplayLcd.cpp

// TODO: Change this. I2C address should be in config file.
LcdDriver LcdDisplay::lcd(0x27,20,4);
#else

cd brewpi_avr/Build
mkdir ./tmp ./final
make clean
make BOARD=uno

If you get an error compiling with Twi.cpp, open it and on line 42 change twi.h to uppercase.

#include "Twi.h"

To be able to configure the temp sensors as temp sensors and not as actuators, you also need to change something in the script.

vim pinList.py

{'val': 14, 'text': 'A0', 'type': 'onewire'},

brewpi_i2c_4

If this Article was useful to you, please consider to buy me a Beer.

14 thoughts on “BrewPi I2C Version

  1. Matt says:

    Thanks, worked perfectly using a l2c LCD from Dealextreme, cheers

  2. Noob says:

    Can you explain “i had to recompile from source on the raspberry pi.” ? Vasco’s Hex file doesn’t work for me either and I need to change the I2C address but I am unfamiliar with how to do this.

    Regards

    1. doomlab says:

      Just use the commands i posted with the correct serial address on your rpi, it should compile a working hex file. If you have any questions, just ask. Cheers!

      1. Noob says:

        Thanks!
        If you couldn’t tell from a recent page visit spike, I’ve poured over this page for many, many hours trying to learn this from scratch 🙂 . I greatly appreciate you sharing this knowledge.

        I also have this LCD with the 0x27 address as confirmed from the scannner sketch.
        I downloaded the correct repository, made the edits you published, and verified that my LCD screen is functional. I ran make BOARD=uno from the Raspberry Pi, but I saw no change on the LCD. Brewpi is displaying ” Could not receive version from controller Please (re)program your controller ” . Is there an additional step I need to do after the make BOARD=uno step?
        Alternatively, can you tell me how I can create a HEX file from the edited files to upload via the BrewPi browser?
        Respectfully,

        Noob

        1. doomlab says:

          The command make BOARD=uno only creates the hex file that you need to programm your arduino with. I just sent it to you via mail.

  3. Walter says:

    would it be at all possible to change the i2c pins instead of the one-wire pin?

    1. doomlab says:

      Check the message above.

  4. Daniel says:

    In case anyone is still interested in I2C, I made an implementation using software i2c. This maintains the revC pinout.
    https://github.com/herrfrost/firmware/tree/feature/SoftwareI2C

    1. Dave says:

      Daniel, I downloaded your Software I2C firmware, but when I try to build it in Atmel Studio 6.2, I do not have an option for ‘Release’, only for ‘Debug’. I get the same thing with the ‘official’ BrewPi 0.2.10 firmware, but with an older BrewPi Firmware, I do have a ‘Build’ option, although it doesn’t build for other reasons. Any thoughts on why I don’t have an option for a ‘Release’ build?

  5. Vince says:

    Thank you very much for this great writeup.

    Any chance there is a new hex file using the 0.2.10 brewpi version, which is the newest compatible version for the arduino?

  6. Kerry R says:

    Daniel – I have downloaded your release from github and poured over it, trying to get it the hex file to work for my UNO with RevCShield. I can get it to compile and upload, etc but the Python scripts just don’t see it once it’s loaded and attached to my Rpi. I can reload the 0.2.10 hex file from brewpi and it works again. I’ve compared the 0.2.10 release to yours and I think I’m covering everything – but can’t figure it out. I would love your help. Are you still around?

  7. Dear I tried get with this comands but… the console shows me this mesage:
    pi@raspberrypi:~/src $ git checkout feature/IICdisplay
    fatal: Not a git repository (or any of the parent directories): .git
    pi@raspberrypi:~/src $ git pull
    fatal: Not a git repository (or any of the parent directories): .git
    pi@raspberrypi:~/src $

    Can you help me please?

Leave a Reply

Your email address will not be published. Required fields are marked *