/*
HelloWorld.ino
A very simple example for Ucglib
Universal uC Color Graphics Library
Copyright (c) 2014, olikraus@gmail.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18 Feb 2014:
ROM Size Font Mode
9928 NONE
10942 TRANSPARENT (1014 Bytes)
11650 SOLID (1712 Bytes)
12214 TRANSPARENT+SOLID
*/
#include <SPI.h>
#include "Ucglib.h"
/*
Hardware SPI Pins:
Arduino Uno sclk=13, data=11
Arduino Due sclk=76, data=75
Arduino Mega sclk=52, data=51
>>> Please uncomment (and update) one of the following constructors. <<<
*/
//Ucglib_ILI9163_18x128x128_SWSPI ucg(/*sclk=*/ 7, /*data=*/ 6, /*cd=*/ 5, /*cs=*/ 3, /*reset=*/ 4);
Ucglib_ILI9163_18x128x128_HWSPI ucg(/*cd=*/ 5, /*cs=*/ 4, /*reset=*/ 3); /* HW SPI Adapter */
void setup(void)
{
delay(1000);
ucg.begin(UCG_FONT_MODE_TRANSPARENT);
//ucg.begin(UCG_FONT_MODE_SOLID);
ucg.clearScreen();
//ucg.setColor(1, 255, 255, 255);
}
void loop(void)
{
//ucg.setRotate90();
ucg.setFont(ucg_font_ncenR12_tr);
ucg.setColor(255, 255, 255);
//ucg.setColor(0, 255, 0);
ucg.setColor(1, 255, 0,0);
ucg.setPrintPos(0,10);
ucg.print("I love Noel!");
ucg.setFont(ucg_font_ncenR12_tr);
ucg.setColor(0, 255, 255);
//ucg.setColor(0, 255, 0);
ucg.setColor(1, 255, 0,0);
ucg.setPrintPos(0,40);
ucg.print("(my BF)");
ucg.setFont(ucg_font_ncenR12_tr);
ucg.setColor(0, 255, 55);
//ucg.setColor(0, 255, 0);
ucg.setColor(1, 255, 0,0);
ucg.setPrintPos(0,70);
ucg.print("Love u baby");
delay(500);
}
uno:A5.2
uno:A4.2
uno:AREF
uno:GND.1
uno:13
uno:12
uno:11
uno:10
uno:9
uno:8
uno:7
uno:6
uno:5
uno:4
uno:3
uno:2
uno:1
uno:0
uno:IOREF
uno:RESET
uno:3.3V
uno:5V
uno:GND.2
uno:GND.3
uno:VIN
uno:A0
uno:A1
uno:A2
uno:A3
uno:A4
uno:A5
chip1:DC
chip1:CS
chip1:SDA
chip1:SCL
chip1:GND
chip1:VCC
chip1:RST