LCD display for MQTT gateway



  • Hi

    I have a MQTT gateway on an Uno with the ethernet shield up and running. I works just fine getting sensor data and forwarding them to the Openhab controller. I run OSX, have Arduino IDE 1.6.4, and MySensors 1.5. But I had to remove the Liquid Display library from MySensors as I got a duplicate library error when trying to use the LCD.

    Now I am trying to get two sensor nodes to communicate with each other without luck. I thought that it would be nice if the gateway had a display where the MQTT messages are shown as they fly by. I only have a "Arduino starter kit" display with 16 x 2 characters but it is better than nothing as I only want to see the messages.

    My problem is that when I add this display to my Uno it does not output anything at all. It lights up but no text. I have succeeded with uploading a sketch with only the display code and that works, so the wirings seem fine.
    I have also commented out the definitions for the extra blinking led displays that is in the example sketch for the MQTT gateway.

    I'm using pin 12, 11, 10, 4, 3, 2 as the Arduino LCD examples does.
    Is there something I have missed in the MySensors library that disturbs the LCD to not work? Or is it the Ethernet shield that uses the pins so they are occupied?

    Any tips or suggestions would be much appreciated.

    /Johan



  • 12, 11 and 10 are used by the ethernetshield for the SPI bus. You should use other pins for the lcd display.



  • That explains a lot. :)

    I moved the 12 and 11 pins to 9 and 8 and it works! Thanks for the tip! :)

    /Johan



  • Hi guys,
    I know this is quite old and I apologise for reopening I'm just wondering if there's a piece of example code for this concept?
    And if it would be possible to show any error states on here like failed connection to the MQTT server or if a node isn't able to be 'pinged' I guess you could say?

    Cheers!


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.