Use a LCD i2c with attiny84: Difference between revisions
Jump to navigation
Jump to search
Line 28: | Line 28: | ||
Open the file TinyWire.h. | Open the file TinyWire.h. | ||
On line 57 replace | On line 57 replace<br> | ||
void send(uint8_t); | void send(uint8_t);<br> | ||
by | by<br> | ||
'''void write(uint8_t);''' | '''void write(uint8_t);'''<br> | ||
On line 60 replace | On line 60 replace<br> | ||
void receive(uint8_t); | void receive(uint8_t);<br> | ||
by | by<br> | ||
'''void read(uint8_t);''' | '''void read(uint8_t);'''<br> |
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.
- The tiny core. https://code.google.com/p/arduino-tiny/
- TinyWireM. This one is different from the official one has it support ATtiny84. http://www.scenelight.nl/?wpfb_dl=22
- LiquidCrystal. https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads/LiquidCrystal_V1.2.1.zip
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);