Giter VIP home page Giter VIP logo

esp_mqtt_lcd's Introduction

esp_mqtt_lcd

ESP8266 displaying mqtt messages on a Nokia 5110 LCD

I'm pulling in several git subtree modules :

Good news, the interface no longer requires 5 available GPIO outputs so an ESP-01 will indeed work. (But only if the RX pin of the esp is used.)

##Usage To use this mqtt enabled LCD you can send text messages to these topics:

  • /lcd0
  • /lcd1
  • /lcd2
  • /lcd3
  • /lcd4
  • /lcd5

Representing each row of the display.

The LCD is also listening to these topics:

  • /lcd/clearscreen
  • /lcd/contrast

You can also send messages to topics that are unique to each esp, look at the debug console for more info.

Pin configuraton

This is how the code is hooked up by default:

PCD8544 ESP8266
RST Pin 1 GPIO4
CE Pin 2 GPIO5
DC Pin 3 GPIO12
Din Pin 4 GPIO13
Clk Pin 5 GPIO14

Some ESP-12 have GPIO4 & GPIO5 reversed.

The RST pin is optional, set it to a negative value and tie PCD8544 reset to ESP reset via a resistor.

The CE pin is optional, set it to a negative value and tie PCD8544 CE pin to GND via a resistor.

All of the pins are configurable, you just set the pins you want to use in the setting struct.

The makefile is copied from esp_mqtt.

###Building and installing:

First you need to install the sdk and the easy way of doing that is to use esp_open_sdk.

You can put that anywhere you like (/opt/local/esp-open-sdk, /esptools etc etc)

Then you could create a small setenv.sh file, containing the location of your newly compiled sdk and other platform specific info;

export SDK_BASE=/opt/local/esp-open-sdk/sdk
export PATH=${SDK_BASE}/../xtensa-lx106-elf/bin:${PATH}
export ESPPORT=/dev/ttyO0  

(or setup your IDE to do the same)

You will have to edit the include/user_config.h file to suit your WiFi and mqtt settings. Alternatively you can copy include/user_config.h into localinclude/user_config.h and git will not bother you about modified files.

To make a clean build, flash and connect to the esp console you just do this in a shell:

source setenv.sh # This is only needed once per session
make clean && make test

You won't be needing esptool, the makefile only uses esptool.py (provided by esp-open-sdk)

I have tested this with sdk 1.5.2, v0.9.5 and v0.9.4 (linux & mac)

esp_mqtt_lcd's People

Contributors

eadf avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.