Giter Club home page Giter Club logo

liquid_crystal_i2c_avr's People

Contributors

denisgoriachev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

liquid_crystal_i2c_avr's Issues

Error compiling

Hi denisgoriachev,
thank you so much for your library. It is very great. But when I follow your instructions, I get this error(s).

  1. I open Arduino IDE and start a new project
  2. I copied all your file(s) (liquid_crystal_i2c.h, liquid_crystal_i2c.c, i2c_master.h, i2c_master.c)
  3. I write a code like this, please correct if I wrong. (https://pastebin.com/raw/1agAgctL)

#define F_CPU 160000000 // 16 MHz
#include <avr/io.h>
#include <util/delay.h>
#include "liquid_crystal_i2c.h"

int main(void) {
LiquidCrystalDevice_t device = lq_init(0x27, 20, 4, LCD_5x8DOTS); // intialize 4-lines display

lq_turnOnBacklight(&device); // simply turning on the backlight

lq_print(&device, "Hello world!");
lq_setCursor(&device, 1, 0); // moving cursor to the next line
lq_print(&device, "How are you?");
}

  1. Then it gave me this error(s) message:
    "Arduino: 1.8.15 (Windows 10), Board: "Arduino Uno"

sketch\liquid_crystal_i2c.c.o (symbol from plugin): In function `i2c_getErrorMessage':

(.text+0x0): multiple definition of `i2c_getErrorMessage'

sketch\i2c_master.c.o (symbol from plugin):(.text+0x0): first defined here

C:\Users**\AppData\Local\Temp\ccKOLEcc.ltrans0.ltrans.o: In function `main':

C:\Users**\Desktop\Test-i2c/Test-i2c.ino:9: undefined reference to `lq_init(unsigned char, unsigned char, unsigned char, unsigned char)'

C:\Users*\Desktop\Test-i2c/Test-i2c.ino:11: undefined reference to `lq_turnOnBacklight(LiquidCrystalDevice_t)'

C:\Users*\Desktop\Test-i2c/Test-i2c.ino:13: undefined reference to `lq_print(LiquidCrystalDevice_t, char*)'

C:\Users*\Desktop\Test-i2c/Test-i2c.ino:14: undefined reference to `lq_setCursor(LiquidCrystalDevice_t, unsigned char, unsigned char)'

C:\Users*\Desktop\Test-i2c/Test-i2c.ino:15: undefined reference to `lq_print(LiquidCrystalDevice_t, char*)'

collect2.exe: error: ld returned 1 exit status

exit status 1

Error compiling for board Arduino Uno."

So I wonder that maybe I miss-understand something in your instruction. Could you spot that for me?

Thank you so much. Have a nice day.

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.