Use a LCD i2c with attiny84: Difference between revisions

From lechacal
Jump to navigation Jump to search
Line 22: Line 22:


  cp /usr/share/arduino/hardware/arduino/cores/arduino/new.* /home/user/sketchbook/hardware/tiny/cores/tiny/
  cp /usr/share/arduino/hardware/arduino/cores/arduino/new.* /home/user/sketchbook/hardware/tiny/cores/tiny/
===TinyWireM===
Open the file TinyWire.h.
On line 57 replace
void send(uint8_t);
by
'''void write(uint8_t);'''
On line 60 replace
void receive(uint8_t);
by
'''void read(uint8_t);'''

Revision as of 22:47, 24 April 2015

Using an ATtiny84 to drive an i2c LCD screen.

Target Hardware

  • ATtiny84 MCU
  • LCD display with i2c adaptor board.

Libraries installation

Three libraries are required.


Libraries Modification

Tiny Core

The tiny core will need to see the new.cpp and new.h from the arduino core. An easy way get this working is to copy the file. On Linux platform this will be something like

cp /usr/share/arduino/hardware/arduino/cores/arduino/new.* /home/user/sketchbook/hardware/tiny/cores/tiny/


TinyWireM

Open the file TinyWire.h.

On line 57 replace void send(uint8_t); by void write(uint8_t);

On line 60 replace void receive(uint8_t); by void read(uint8_t);