Elecrow TFT HDMI Display 7 Inch 1024x600 [B190]





https://www.youtube.com/watch?v=sefEwRMQRoc


* Specs

Power: DC 7.5v-12v/1.5-2A

16:10 display ratio

Resolution:1024x600

Visible area: 150mm x 85mm

Weight:300


* Contents

- Yes, this is an adorable small HDMI television with incredibly high resolution! We tried to get the smallest possible HDMI display with high-res, high-contrast visibility. The display is very easy to use 

- it should be powered by 12DC, then connect a digital video source to one of the ports. It work connect to any device with direct HDMI such as raspberry pi, banana pi and pcduino. The biggest difference is that it can work when you plug it on device without any software support.


- If you want a power adapter : 12V/2A Power Supply



Posted by RDIoT
|

7 inch 1024*600 TFT LCD with Driver Board [D053]



https://www.youtube.com/watch?v=RPg8WPzc5UM


* Specs

- Features: 

Power input: DC 5V~12V, 2A, 6~7W;

Signal input, 2 AV + VGA +HDMI (HDMI 1.1);

Physical Resolution: 1024 x 600; Resolution Range: 640 x 480 ~ 1600 x 1200 (adjustable

Language support: Chinese (simple), Chinese (traditional), English, Japanese, Korea, Spanish, French, German, Italian, Portuguese;

Control, OSD;

Viewing angle: L70 ° R70 ° U50 ° D60;

Panel type, TFT; Contrast: 500:1;

Brightness: 220cd/m2;

Response time: 20ms;

Background light: LED;

Working temperature: -20 ~ 80;

Interface: 50 PIN Digital (TTL) TCON;

- Package Includes:

1 x 7-inch LCD screen

1 x LCD Driver board

1 x White cable (connected to the key board)

1 x Long green key board

1 x USB to DC5.5 power line

Posted by RDIoT
|

7 inch TFT LCD Module SSD1963 800x480 (SSD1963) [D042]



https://www.youtube.com/watch?v=fMkpTKbwMIo


* GitHubhttps://github.com/rdiot/rdiot-d042.git


* Specs

This 7.0" TFT LCD Module can be can be easy controlled by MCU such as 51,AVR,STM32,PIC,MSP430,DSP,ARM, and ARM .It can be used in any embedded systems which require display high quality colorful image. The Module used

SSD1963  LCD controller with 7 inch LCD module with touchscreen. This LCD has a superior display quality and super wide viewing angle, please see the sample pictures, they are taken directly from the LCD display.


7.0" TFT LCD Module, Resolution 800x480, SSD1963  Controller

LCD Type: TFT Transmissive Normal White 

Interface: 16bit parallel bus interface 

PCB Color: Blue 

On board 400mA DC-DC Boost regulator to provide power supply to LCD backlight 

LCD-specificed intialization code is provided, so that you can save time to optimize power control register and gamma curves for best display performance. We have test the provided code, it gives the best display performanace 

Module dimension: 186mmx106mmx23mm(including pin header extrusion) 

Active Area: 154mmx86mm 

Pixel pitch: 0.179mmx0.179mm 

Standard 2x20 2.54mm pin header for connection to MCU/development board 

Module weight: 410grams 


* Contents

Arduino Mega + TFT LCD Mega Shield v2.2 

Define the Model Name

UTFT myGLCD(TFT01_70,38,39,40,41);


- Library UTFT : http://www.rinkydinkelectronics.com/library.php?id=51


- Key Code : Ref Code

// UTFT_Demo_800x480 

// Copyright (C)2015 Rinky-Dink Electronics, Henning Karlsen. All right reserved

// web: http://www.RinkyDinkElectronics.com/

//

// This program is a demo of how to use most of the functions

// of the library with a supported display modules.

//

// This demo was made for modules with a screen resolution 

// of 800x480 pixels.

//

// This program requires the UTFT library.

//

 

#include <UTFT.h>

 

// Declare which fonts we will be using

extern uint8_t SmallFont[];

 

// Set the pins to the correct ones for your development shield

// ------------------------------------------------------------

// Arduino Uno / 2009:

// -------------------

// Standard Arduino Uno/2009 shield            : <display model>,A5,A4,A3,A2

// DisplayModule Arduino Uno TFT shield        : <display model>,A5,A4,A3,A2

//

// Arduino Mega:

// -------------------

// Standard Arduino Mega/Due shield            : <display model>,38,39,40,41

// CTE TFT LCD/SD Shield for Arduino Mega      : <display model>,38,39,40,41

//

// Remember to change the model parameter to suit your display module!

UTFT myGLCD(TFT01_70,38,39,40,41);

 

void setup()

{

  randomSeed(analogRead(0));

  

// Setup the LCD

  myGLCD.InitLCD();

  myGLCD.setFont(SmallFont);

}

 

void loop()

{

  int buf[798];

  int x, x2;

  int y, y2;

  int r;

 

// Clear the screen and draw the frame

  myGLCD.clrScr();

 

  myGLCD.setColor(255, 0, 0);

  myGLCD.fillRect(0, 0, 799, 13);

  myGLCD.setColor(64, 64, 64);

  myGLCD.fillRect(0, 466, 799, 479);

  myGLCD.setColor(255, 255, 255);

  myGLCD.setBackColor(255, 0, 0);

  myGLCD.print("* 7 inch LCD *", CENTER, 1);

  myGLCD.setBackColor(64, 64, 64);

  myGLCD.setColor(255,255,0);

  myGLCD.print("<RDKIM>", CENTER, 467);

 

  myGLCD.setColor(0, 0, 255);

  myGLCD.drawRect(0, 14, 799, 465);

 

// Draw crosshairs

  myGLCD.setColor(0, 0, 255);

  myGLCD.setBackColor(0, 0, 0);

  myGLCD.drawLine(399, 15, 399, 464);

  myGLCD.drawLine(1, 239, 798, 239);

  for (int i=9; i<790; i+=10)

    myGLCD.drawLine(i, 237, i, 242);

  for (int i=19; i<470; i+=10)

    myGLCD.drawLine(397, i, 402, i);

 

// Draw sin-, cos- and tan-lines  

  myGLCD.setColor(0,255,255);

  myGLCD.print("Sin", 5, 15);

  for (int i=1; i<798; i++)

  {

    myGLCD.drawPixel(i,239+(sin(((i*1.13)*3.14)/180)*200));

  }

  

  myGLCD.setColor(255,0,0);

  myGLCD.print("Cos", 5, 27);

  for (int i=1; i<798; i++)

  {

    myGLCD.drawPixel(i,239+(cos(((i*1.13)*3.14)/180)*200));

  }

 

  myGLCD.setColor(255,255,0);

  myGLCD.print("Tan", 5, 39);

  for (int i=1; i<798; i++)

  {

    myGLCD.drawPixel(i,239+(tan(((i*0.9)*3.14)/180)));

  }

 

  delay(2000);

 

  myGLCD.setColor(0,0,0);

  myGLCD.fillRect(1,15,798,464);

  myGLCD.setColor(0, 0, 255);

  myGLCD.setBackColor(0, 0, 0);

  myGLCD.drawLine(399, 15, 399, 464);

  myGLCD.drawLine(1, 239, 798, 239);

 

// Draw a moving sinewave

  x=1;

  for (int i=1; i<(798*20); i++) 

  {

    x++;

    if (x==799)

      x=1;

    if (i>799)

    {

      if ((x==399)(buf[x-1]==239))

        myGLCD.setColor(0,0,255);

      else

        myGLCD.setColor(0,0,0);

      myGLCD.drawPixel(x,buf[x-1]);

    }

    myGLCD.setColor(0,255,255);

    y=239+(sin(((i*1.65)*3.14)/180)*(200-(i / 100)));

    myGLCD.drawPixel(x,y);

    buf[x-1]=y;

  }

 

  delay(2000);

  

  myGLCD.setColor(0,0,0);

  myGLCD.fillRect(1,15,798,464);

 

// Draw some random filled rectangles

  for (int i=0; i<50; i++)

  {

    myGLCD.setColor(random(255), random(255), random(255));

    x=2+random(746);

    y=16+random(397);

    x2=x+50;

    y2=y+50;

    myGLCD.fillRect(x, y, x2, y2);

  }

 

  delay(2000);

  

  myGLCD.setColor(0,0,0);

  myGLCD.fillRect(1,15,798,464);

 

// Draw some random filled, rounded rectangles

  for (int i=0; i<50; i++)

  {

    myGLCD.setColor(random(255), random(255), random(255));

    x=2+random(746);

    y=16+random(397);

    x2=x+50;

    y2=y+50;

    myGLCD.fillRoundRect(x, y, x2, y2);

  }

  

  delay(2000);

  

  myGLCD.setColor(0,0,0);

  myGLCD.fillRect(1,15,798,464);

 

// Draw some random filled circles

  for (int i=0; i<50; i++)

  {

    myGLCD.setColor(random(255), random(255), random(255));

    x=27+random(746);

    y=41+random(397);

    myGLCD.fillCircle(x, y, 25);

  }

  

  delay(2000);

  

  myGLCD.setColor(0,0,0);

  myGLCD.fillRect(1,15,798,464);

 

// Draw some lines in a pattern

  myGLCD.setColor (255,0,0);

  for (int i=15; i<463; i+=5)

  {

    myGLCD.drawLine(1, i, (i*1.66)-10, 463);

  }

  myGLCD.setColor (255,0,0);

  for (int i=463; i>15; i-=5)

  {

    myGLCD.drawLine(798, i, (i*1.66)+30, 15);

  }

  myGLCD.setColor (0,255,255);

  for (int i=463; i>15; i-=5)

  {

    myGLCD.drawLine(1, i, 770-(i*1.66), 15);

  }

  myGLCD.setColor (0,255,255);

  for (int i=15; i<463; i+=5)

  {

    myGLCD.drawLine(798, i, 810-(i*1.66), 463);

  }

  

  delay(2000);

  

  myGLCD.setColor(0,0,0);

  myGLCD.fillRect(1,15,798,464);

 

// Draw some random circles

  for (int i=0; i<250; i++)

  {

    myGLCD.setColor(random(255), random(255), random(255));

    x=32+random(736);

    y=45+random(386);

    r=random(30);

    myGLCD.drawCircle(x, y, r);

  }

 

  delay(2000);

  

  myGLCD.setColor(0,0,0);

  myGLCD.fillRect(1,15,798,464);

 

// Draw some random rectangles

  for (int i=0; i<250; i++)

  {

    myGLCD.setColor(random(255), random(255), random(255));

    x=2+random(796);

    y=16+random(447);

    x2=2+random(796);

    y2=16+random(447);

    myGLCD.drawRect(x, y, x2, y2);

  }

 

  delay(2000);

  

  myGLCD.setColor(0,0,0);

  myGLCD.fillRect(1,15,798,464);

 

// Draw some random rounded rectangles

  for (int i=0; i<250; i++)

  {

    myGLCD.setColor(random(255), random(255), random(255));

    x=2+random(796);

    y=16+random(447);

    x2=2+random(796);

    y2=16+random(447);

    myGLCD.drawRoundRect(x, y, x2, y2);

  }

 

  delay(2000);

  

  myGLCD.setColor(0,0,0);

  myGLCD.fillRect(1,15,798,464);

 

  for (int i=0; i<250; i++)

  {

    myGLCD.setColor(random(255), random(255), random(255));

    x=2+random(796);

    y=16+random(447);

    x2=2+random(796);

    y2=16+random(447);

    myGLCD.drawLine(x, y, x2, y2);

  }

 

  delay(2000);

  

  myGLCD.setColor(0,0,0);

  myGLCD.fillRect(1,15,798,464);

 

  for (int i=0; i<10000; i++)

  {

    myGLCD.setColor(random(255), random(255), random(255));

    myGLCD.drawPixel(2+random(796), 16+random(447));

  }

 

  delay(2000);

 

  myGLCD.fillScr(0, 0, 255);

  myGLCD.setColor(255, 0, 0);

  myGLCD.fillRoundRect(320, 190, 479, 289);

  

  myGLCD.setColor(255, 255, 255);

  myGLCD.setBackColor(255, 0, 0);

  myGLCD.print("That's it!", CENTER, 213);

  myGLCD.print("Restarting in a", CENTER, 239);

  myGLCD.print("few seconds...", CENTER, 252);

  

  myGLCD.setColor(0, 255, 0);

  myGLCD.setBackColor(0, 0, 255);

  myGLCD.print("Runtime: (msecs)", CENTER, 450);

  myGLCD.printNumI(millis(), CENTER, 465);

  

  delay (10000);

}

Posted by RDIoT
|

2.4 Inch TFT Touch LCD Shield (ST7781) [D001]



Loading Graphic : https://www.youtube.com/watch?v=GYCeGMsrbFA


Draw :  https://www.youtube.com/watch?v=PJ1l4Nn3UVw


* GitHub https://github.com/rdiot/rdiot-d001.git


* Specs

There’s no doubt Arduino has quickly become the world’s most popular do-it-yourself microcontroller board system, thanks to its simplicity, versatility and surprisingly low cost. But the key to that versatility is its Shield header that allows daughter boards or ‘shields’ to extend the Arduino’s functionality. In the last project, we built a digital clock project using the popular 1602 alphanumeric LCD shield and it’s hopefully had your mind ticking over with other ideas and possibilities. This month, we’re going a step further, introducing a new low-cost shield that incorporates a 320 x 240-pixel TFT LCD touchscreen.


The ST7781 is a single-chip controller/driver for 262K-color, graphic type TFT-LCD. It consists of 720 source line and

320 gate line driving circuits. This chip is capable of connecting directly to an external microprocessor, and accepts,

8-bits/9-bits/16-bits/18-bits parallel interface. Display data can be stored in the on-chip display data RAM of 240x320x18

bits. It can perform display data RAM read/write operation with no external operation clock to minimize power

consumption. In addition, because of the integrated power supply circuits necessary to drive liquid crystal, it is possible to

make a display system with the fewest components. 


Driver Output:

- 720ch Source Outputs (240 X RGB)

- 320ch Gate Outputs

- Common Electrode Output 


Single Chip Display RAM:

-Capacity: 240x320x18 bit 


Support Display Color

- 65K Color

- 262K Color

- 8-color (Idle Mode) 


Supported LC Type Option

- MVA LC Type

- Transflective LC Type

- Transmissive LC Type 


Supported MCU Interface

- 8/9/16/18-bit Interface with 8080-Series MCU 


Display Features

- Partial Display Mode

- Resizing Function (x1/2, x1/4)


Build-in Circuit

- DC/DC Converter

- Adjustable VCOM Generation

- Oscillator for Display Clock Generation

- Timing Controller

- Non-volatile Memory for Factory Default Value

- Line Inversion, Frame Inversion 


Non-Volatile Memory

- 7-bits for ID Code

- 5-bits for VCOM Adjustment 


Supply Voltage Range

- Analog Supply Voltage (VDD) Range: 2.5V to 3.3V

- I/O Supply Voltage (VDDI) Range: 1.65V to 3.3V


Output Voltage Level

- GVDD – AGND: 3V to (AVDD-0.5) V

- AVDD – AGND: 4.5V to 5.6V

- VCL – AGND: -2.0V to -3.0V

- VCOMH – AGND: 3.0V to (AVDD-0.5) V

- VCOML – AGND: (VCL+0.5) V to 0.0V

- VGH – AGND: 10V to 16.5V

- VGL – AGND: -5V to -14V 


Lower Power Consumption

- CMOS Compatible Inputs

- Optimized Layout for COG Assembly

- Operate Temperature Range: -30 ℃ ~ +85℃



* Contents

- DataSheet : http://www.rockbox.org/wiki/pub/Main/SansaFuzePlus/ST7781.pdf

- Library1 : https://github.com/samuraijap/TFTLCD-Library  

- Library2 : https://github.com/adafruit/Adafruit-GFX-Library


- Tested Library : TFTLCD_Rack_Dongari_tftpaint_fixed.zip

modify 

ili9341(2.4inch 240x320)

#define TFTWIDTH   240

#define TFTHEIGHT  320

//#define TFTWIDTH   320

//#define TFTHEIGHT  480


identifier == 0x9325

uint16_t identifier = tft.readID();

TFT size is 240x320

Found ILI9325 LCD driver 


- Connect / Pin Map

A0 LCD_RD

A1 LCD_WR / TS_YP

A2 LCD_RS / TS_XM

A3 LCD_CS

A4 LCD_RST

D8 LCD_D0

D9 LCD_D1

D2 LCD_D2

D3 LCD_D3

D4 LCD_D4

D5 LCD_D5

D6 LCD_D6 / TS_XP

D7 LCD_D7 / TS_YM

D8 SD_SS

D9 SD_DI

D10 SD_DO

D11 SD_SCK

Posted by RDIoT
|

Mobile Universal Battery Charger LCD [B070]



https://www.youtube.com/watch?v=nQeLb5nlBa4


* Specs

Feature:

Brand:YIBOYUAN

100% Brand New and High Quality Universal Battery Charger with USB Output Intelligent dedicated battery charger with USB output.

When the battery is fully charged,automatically stop charging.

Safety cut out circuit,Built-in protection circuit prevents overcharging.

Constant current,constant voltage charging,automatic identification.

The high-quality LCD screen indicates connection and full charge.

Also convenient to interchange your spare batteries Use the data line which corresponds to mobile phone can be charged directly to the phone.

Intelligent Chip: The smart chip protects from short circuit and overload by regulating voltage an ensuring a high effeciency charge. 


Technical Specifications:

Input: AC 100-240V 50/60Hz 150mA

Output: DC 4.2V 400mA +/-50mA,USB Port Output: DC5.2V, 1250mA(USB)

Connecter: US Plug

Short circuit and overload protection

Note: This Charger Just Fit For The Battery (32mm<=width<=55mm)


Compatible for:

For Acer, for Asus, for BlackBerry, for Casio, for HTC, for LG, for Motorola, for Nokia, for Samsung, for Sony Ericsson, for Toshiba, and so on.

Mp3 Mp4 players

Digital cameras

Mobile phones

...and many more rechargeable lithium-ion batteries under 4.7 volts

Posted by RDIoT
|

84x84 Nokia 5110 LCD Module (LCD5110) [D055]



https://www.youtube.com/watch?v=PvXZjwpwZQA


*GitHubhttps://github.com/rdiot/rdiot-d055.git


* Specs

Power supply voltage: 2.7V-3.3V,5V is OK,but part of the screen becomes black when tested

Data interface level: 2.7-5V

Backlight power supply voltage: highest 3.3V

Module size: 43.6mm x 43.1mm(width X height)

Installation diameter: 2mm

Backlight: White


Features : 

84 X 84 dot matrix LCD,can show 4 lines of characters

Use serial interface communicate with the master processor,the number of interface signal line reduced greatly, only 8 signal lines including power and GND.Support different types of MCU,such as the SPI,MCS51 serial mode 0 of AVR.Transfer rate up to 4Mbps,can full speed write display data without waiting time.

Can use the conductive glue to connect the module with the printed board,without connecting cable.The metal hooks on the module can fix the module on the printed board,which is very easy to install and replace.

LCD controller/driver chip has been bound to LCD chip,the volume of LCD is small

Low power supply,the working current in normal situation is lower than 200μA,and has power-down mode



* Contents

- Library1 :  https://github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library

- Library2 : https://github.com/adafruit/Adafruit-GFX-Library


- Connect

RST ----- D3

CE ----- D4

DC ----- D5

Din ----- D6

CLK ----- D7

VCC ----- 5V

BL ----- 5V / GND

GND ----- GND


- Key Code Sample

/*********************************************************************

This is an example sketch for our Monochrome Nokia 5110 LCD Displays


  Pick one up today in the adafruit shop!

  ------> http://www.adafruit.com/products/338


These displays use SPI to communicate, 4 or 5 pins are required to

interface


Adafruit invests time and resources providing this open source code,

please support Adafruit and open-source hardware by purchasing

products from Adafruit!


Written by Limor Fried/Ladyada  for Adafruit Industries.

BSD license, check license.txt for more information

All text above, and the splash screen must be included in any redistribution

*********************************************************************/


#include <SPI.h>

#include <Adafruit_GFX.h>

#include <Adafruit_PCD8544.h>


// Software SPI (slower updates, more flexible pin options):

// pin 7 - Serial clock out (SCLK)

// pin 6 - Serial data out (DIN)

// pin 5 - Data/Command select (D/C)

// pin 4 - LCD chip select (CS)

// pin 3 - LCD reset (RST)

Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3);


// Hardware SPI (faster, but must use certain hardware pins):

// SCK is LCD serial clock (SCLK) - this is pin 13 on Arduino Uno

// MOSI is LCD DIN - this is pin 11 on an Arduino Uno

// pin 5 - Data/Command select (D/C)

// pin 4 - LCD chip select (CS)

// pin 3 - LCD reset (RST)

// Adafruit_PCD8544 display = Adafruit_PCD8544(5, 4, 3);

// Note with hardware SPI MISO and SS pins aren't used but will still be read

// and written to during SPI transfer.  Be careful sharing these pins!


#define NUMFLAKES 10

#define XPOS 0

#define YPOS 1

#define DELTAY 2



#define LOGO16_GLCD_HEIGHT 16

#define LOGO16_GLCD_WIDTH  16


static const unsigned char PROGMEM logo16_glcd_bmp[] =

{ B00000000, B11000000,

  B00000001, B11000000,

  B00000001, B11000000,

  B00000011, B11100000,

  B11110011, B11100000,

  B11111110, B11111000,

  B01111110, B11111111,

  B00110011, B10011111,

  B00011111, B11111100,

  B00001101, B01110000,

  B00011011, B10100000,

  B00111111, B11100000,

  B00111111, B11110000,

  B01111100, B11110000,

  B01110000, B01110000,

  B00000000, B00110000 };


void setup()   {

  Serial.begin(9600);


  display.begin();

  // init done


  // you can change the contrast around to adapt the display

  // for the best viewing!

  display.setContrast(50);


  display.display(); // show splashscreen

  delay(2000);

  display.clearDisplay();   // clears the screen and buffer


  // draw a single pixel

  display.drawPixel(10, 10, BLACK);

  display.display();

  delay(2000);

  display.clearDisplay();


  // draw many lines

  testdrawline();

  display.display();

  delay(2000);

  display.clearDisplay();


  // draw rectangles

  testdrawrect();

  display.display();

  delay(2000);

  display.clearDisplay();


  // draw multiple rectangles

  testfillrect();

  display.display();

  delay(2000);

  display.clearDisplay();


  // draw mulitple circles

  testdrawcircle();

  display.display();

  delay(2000);

  display.clearDisplay();


  // draw a circle, 10 pixel radius

  display.fillCircle(display.width()/2, display.height()/2, 10, BLACK);

  display.display();

  delay(2000);

  display.clearDisplay();


  testdrawroundrect();

  delay(2000);

  display.clearDisplay();


  testfillroundrect();

  delay(2000);

  display.clearDisplay();


  testdrawtriangle();

  delay(2000);

  display.clearDisplay();

   

  testfilltriangle();

  delay(2000);

  display.clearDisplay();


  // draw the first ~12 characters in the font

  testdrawchar();

  display.display();

  delay(2000);

  display.clearDisplay();


  // text display tests

  display.setTextSize(1);

  display.setTextColor(BLACK);

  display.setCursor(0,0);

  display.println("Hello, world!");

  display.setTextColor(WHITE, BLACK); // 'inverted' text

  display.println(3.141592);

  display.setTextSize(2);

  display.setTextColor(BLACK);

  display.print("0x"); display.println(0xDEADBEEF, HEX);

  display.display();

  delay(2000);


  // rotation example

  display.clearDisplay();

  display.setRotation(1);  // rotate 90 degrees counter clockwise, can also use values of 2 and 3 to go further.

  display.setTextSize(1);

  display.setTextColor(BLACK);

  display.setCursor(0,0);

  display.println("Rotation");

  display.setTextSize(2);

  display.println("Example!");

  display.display();

  delay(2000);


  // revert back to no rotation

  display.setRotation(0);


  // miniature bitmap display

  display.clearDisplay();

  display.drawBitmap(30, 16,  logo16_glcd_bmp, 16, 16, 1);

  display.display();


  // invert the display

  display.invertDisplay(true);

  delay(1000); 

  display.invertDisplay(false);

  delay(1000); 


  // draw a bitmap icon and 'animate' movement

  testdrawbitmap(logo16_glcd_bmp, LOGO16_GLCD_WIDTH, LOGO16_GLCD_HEIGHT);

}



void loop() {

  

}



void testdrawbitmap(const uint8_t *bitmap, uint8_t w, uint8_t h) {

  uint8_t icons[NUMFLAKES][3];

  randomSeed(666);     // whatever seed

 

  // initialize

  for (uint8_t f=0; f< NUMFLAKES; f++) {

    icons[f][XPOS] = random(display.width());

    icons[f][YPOS] = 0;

    icons[f][DELTAY] = random(5) + 1;

    

    Serial.print("x: ");

    Serial.print(icons[f][XPOS], DEC);

    Serial.print(" y: ");

    Serial.print(icons[f][YPOS], DEC);

    Serial.print(" dy: ");

    Serial.println(icons[f][DELTAY], DEC);

  }


  while (1) {

    // draw each icon

    for (uint8_t f=0; f< NUMFLAKES; f++) {

      display.drawBitmap(icons[f][XPOS], icons[f][YPOS], logo16_glcd_bmp, w, h, BLACK);

    }

    display.display();

    delay(200);

    

    // then erase it + move it

    for (uint8_t f=0; f< NUMFLAKES; f++) {

      display.drawBitmap(icons[f][XPOS], icons[f][YPOS],  logo16_glcd_bmp, w, h, WHITE);

      // move it

      icons[f][YPOS] += icons[f][DELTAY];

      // if its gone, reinit

      if (icons[f][YPOS] > display.height()) {

 icons[f][XPOS] = random(display.width());

 icons[f][YPOS] = 0;

 icons[f][DELTAY] = random(5) + 1;

      }

    }

   }

}



void testdrawchar(void) {

  display.setTextSize(1);

  display.setTextColor(BLACK);

  display.setCursor(0,0);


  for (uint8_t i=0; i < 168; i++) {

    if (i == '\n') continue;

    display.write(i);

    //if ((i > 0) && (i % 14 == 0))

      //display.println();

  }    

  display.display();

}


void testdrawcircle(void) {

  for (int16_t i=0; i<display.height(); i+=2) {

    display.drawCircle(display.width()/2, display.height()/2, i, BLACK);

    display.display();

  }

}


void testfillrect(void) {

  uint8_t color = 1;

  for (int16_t i=0; i<display.height()/2; i+=3) {

    // alternate colors

    display.fillRect(i, i, display.width()-i*2, display.height()-i*2, color%2);

    display.display();

    color++;

  }

}


void testdrawtriangle(void) {

  for (int16_t i=0; i<min(display.width(),display.height())/2; i+=5) {

    display.drawTriangle(display.width()/2, display.height()/2-i,

                     display.width()/2-i, display.height()/2+i,

                     display.width()/2+i, display.height()/2+i, BLACK);

    display.display();

  }

}


void testfilltriangle(void) {

  uint8_t color = BLACK;

  for (int16_t i=min(display.width(),display.height())/2; i>0; i-=5) {

    display.fillTriangle(display.width()/2, display.height()/2-i,

                     display.width()/2-i, display.height()/2+i,

                     display.width()/2+i, display.height()/2+i, color);

    if (color == WHITE) color = BLACK;

    else color = WHITE;

    display.display();

  }

}


void testdrawroundrect(void) {

  for (int16_t i=0; i<display.height()/2-2; i+=2) {

    display.drawRoundRect(i, i, display.width()-2*i, display.height()-2*i, display.height()/4, BLACK);

    display.display();

  }

}


void testfillroundrect(void) {

  uint8_t color = BLACK;

  for (int16_t i=0; i<display.height()/2-2; i+=2) {

    display.fillRoundRect(i, i, display.width()-2*i, display.height()-2*i, display.height()/4, color);

    if (color == WHITE) color = BLACK;

    else color = WHITE;

    display.display();

  }

}

   

void testdrawrect(void) {

  for (int16_t i=0; i<display.height()/2; i+=2) {

    display.drawRect(i, i, display.width()-2*i, display.height()-2*i, BLACK);

    display.display();

  }

}


void testdrawline() {  

  for (int16_t i=0; i<display.width(); i+=4) {

    display.drawLine(0, 0, i, display.height()-1, BLACK);

    display.display();

  }

  for (int16_t i=0; i<display.height(); i+=4) {

    display.drawLine(0, 0, display.width()-1, i, BLACK);

    display.display();

  }

  delay(250);

  

  display.clearDisplay();

  for (int16_t i=0; i<display.width(); i+=4) {

    display.drawLine(0, display.height()-1, i, 0, BLACK);

    display.display();

  }

  for (int8_t i=display.height()-1; i>=0; i-=4) {

    display.drawLine(0, display.height()-1, display.width()-1, i, BLACK);

    display.display();

  }

  delay(250);

  

  display.clearDisplay();

  for (int16_t i=display.width()-1; i>=0; i-=4) {

    display.drawLine(display.width()-1, display.height()-1, i, 0, BLACK);

    display.display();

  }

  for (int16_t i=display.height()-1; i>=0; i-=4) {

    display.drawLine(display.width()-1, display.height()-1, 0, i, BLACK);

    display.display();

  }

  delay(250);


  display.clearDisplay();

  for (int16_t i=0; i<display.height(); i+=4) {

    display.drawLine(display.width()-1, 0, 0, i, BLACK);

    display.display();

  }

  for (int16_t i=0; i<display.width(); i+=4) {

    display.drawLine(display.width()-1, 0, i, display.height()-1, BLACK); 

    display.display();

  }

  delay(250);

}

'3) Actuator > LCD' 카테고리의 다른 글

LCD 4002 Blue (ERM4002SBS-1) [D051]  (0) 2016.09.21
LCD Keypad Shield Green (LCD1602) [D043]  (0) 2016.09.21
LCD Keypad Shield (LCD1602) [D038]  (0) 2016.09.21
LCD2004 I2C Green (LCD2004A) [D046]  (0) 2016.09.21
LCD2004 I2C ( LCD2004A) [D017]  (0) 2016.09.21
Posted by RDIoT
|

LCD Keypad Shield Green (LCD1602) [D043]



https://www.youtube.com/watch?v=aV0yBmVPMyU


*GitHub : https://github.com/rdiot/rdiot-d043.git


* Specs

Useful LCD display for Arduino with 16 symbols and 2 lines. Display background LED is connected to potentiometer regulating screen  brightness and contrast. You can control switching on/off with sketch.

Display has GREEN color.

LCD display uses standard HD44780-compatible driver. Arduino "LiquidCrystal" library is used for display programming and can be found in Arduino IDE  coding environment. You can use standard characters or make your own characters.

LCD display uses digital Arduino digital outputs: 4, 5, 6, 7, 8, 9.

Initialization string in sketch seems as: LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

: ( RS - D8; Enable - D9; LCD4 - D4; LCD5 - D5; LCD6 - D6; LCD7 - D7)

Under LCD there are 5 navigation buttons: Up, Down, Left, Right.

Option. Buttons are connected with A0 analog input only, so you can monitor button status using just one Arduino input. Pay attention: status monitoring is unavailable when several buttons are pressed.

Shield includes  blocks of digital and analog inputs/outputs and also it has A1-A5 analog input blocks (5V/GND/IN) for quick connection to periphery.

Shield is powered with Arduino 5V output. 

'3) Actuator > LCD' 카테고리의 다른 글

84x84 Nokia 5110 LCD Module (LCD5110) [D055]  (0) 2016.09.21
LCD 4002 Blue (ERM4002SBS-1) [D051]  (0) 2016.09.21
LCD Keypad Shield (LCD1602) [D038]  (0) 2016.09.21
LCD2004 I2C Green (LCD2004A) [D046]  (0) 2016.09.21
LCD2004 I2C ( LCD2004A) [D017]  (0) 2016.09.21
Posted by RDIoT
|

LCD Keypad Shield (LCD1602) [D038]



https://www.youtube.com/watch?v=gnCqb5Q-FQo


*GitHub https://github.com/rdiot/rdiot-d038.git


* Contents

- Pin Out : https://www.dfrobot.com/wiki/images/thumb/5/5e/DFR0009-PIN2.png/900px-DFR0009-PIN2.png

- Ref Url : http://www.dfrobot.com/wiki/index.php/LCD_KeyPad_Shield_For_Arduino_SKU:_DFR0009

- Key Code (Left -> ..)

#include <LiquidCrystal.h>

 

LiquidCrystal lcd(8, 9, 4, 5, 6, 7);           // select the pins used on the LCD panel

 

// define some values used by the panel and buttons

int lcd_key     = 0;

int adc_key_in  = 0;

 

#define btnRIGHT  0

#define btnUP     1

#define btnDOWN   2

#define btnLEFT   3

#define btnSELECT 4

#define btnNONE   5

 

int read_LCD_buttons(){               // read the buttons

    adc_key_in = analogRead(0);       // read the value from the sensor 

 

    // my buttons when read are centered at these valies: 0, 144, 329, 504, 741

    // we add approx 50 to those values and check to see if we are close

    // We make this the 1st option for speed reasons since it will be the most likely result

 

    if (adc_key_in > 1000) return btnNONE; 

 

    // For V1.1 us this threshold

    //if (adc_key_in < 50)   return btnRIGHT;  

    //if (adc_key_in < 250)  return btnUP; 

    //if (adc_key_in < 450)  return btnDOWN; 

    //if (adc_key_in < 650)  return btnLEFT; 

    //if (adc_key_in < 850)  return btnSELECT;  

 

   // For V1.0 comment the other threshold and use the one below:

   

     if (adc_key_in < 50)   return btnRIGHT;  

     if (adc_key_in < 195)  return btnUP; 

     if (adc_key_in < 380)  return btnDOWN; 

     if (adc_key_in < 555)  return btnLEFT; 

     if (adc_key_in < 790)  return btnSELECT;   


    return btnNONE;                // when all others fail, return this.

}

 

void setup(){

   lcd.begin(16, 2);               // start the library

   lcd.setCursor(0,0);             // set the LCD cursor   position 

   lcd.print("D038 - Push BTNs");  // print a simple message on the LCD

}

  

void loop(){

   lcd.setCursor(9,1);             // move cursor to second line "1" and 9 spaces over

   lcd.print(millis()/1000);       // display seconds elapsed since power-up

 

   lcd.setCursor(0,1);             // move to the begining of the second line

   lcd_key = read_LCD_buttons();   // read the buttons

 

   switch (lcd_key){               // depending on which button was pushed, we perform an action

 

       case btnRIGHT:{             //  push button "RIGHT" and show the word on the screen

            lcd.print("RIGHT ");

            break;

       }

       case btnLEFT:{

             lcd.print("LEFT   "); //  push button "LEFT" and show the word on the screen

             break;

       }    

       case btnUP:{

             lcd.print("UP    ");  //  push button "UP" and show the word on the screen

             break;

       }

       case btnDOWN:{

             lcd.print("DOWN  ");  //  push button "DOWN" and show the word on the screen

             break;

       }

       case btnSELECT:{

             lcd.print("SELECT");  //  push button "SELECT" and show the word on the screen

             break;

       }

       case btnNONE:{

             lcd.print("NONE  ");  //  No action  will show "None" on the screen

             break;

       }

   }

}


- Key Code (Sensor Value)

#include <LiquidCrystal.h>

 

LiquidCrystal lcd(8, 9, 4, 5, 6, 7);        // select the pins used on the LCD panel

 

unsigned long tepTimer ;   

 

void setup(){

    lcd.begin(16, 2);                       // start the library

}

 

void loop(){

    lcd.setCursor(0, 0);                   // set the LCD cursor   position

    int val;                               // variable to store the value coming from the analog pin

    double data;                           // variable to store the temperature value coming from the conversion formula

    val=analogRead(1);                     // read the analog in value:

    data = (double) val * (5/10.24);       // temperature conversion formula

     

    if(millis() - tepTimer > 500){         // output a temperature value per 500ms

             tepTimer = millis();

 

             // print the results to the lcd

             lcd.print("T: ");              

             lcd.print(data);            

             lcd.print("C");             

     }

}

'3) Actuator > LCD' 카테고리의 다른 글

LCD 4002 Blue (ERM4002SBS-1) [D051]  (0) 2016.09.21
LCD Keypad Shield Green (LCD1602) [D043]  (0) 2016.09.21
LCD2004 I2C Green (LCD2004A) [D046]  (0) 2016.09.21
LCD2004 I2C ( LCD2004A) [D017]  (0) 2016.09.21
LCD1602 I2C (LCD1602) [D016]  (0) 2016.09.21
Posted by RDIoT
|

LCD2004 I2C Green (LCD2004A) [D046]



https://www.youtube.com/watch?v=rVxFB_l_hGc


*GitHub : https://github.com/rdiot/rdiot-d046.git

* Contents

- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

 

LiquidCrystal_I2C lcd(0x27,20,4);  // set the LCD address to 0x20 for a 16 chars and 2 line display

 

void setup()

{

  lcd.init();                      // initialize the lcd 

  // Print a message to the LCD.

  lcd.backlight();

  lcd.setCursor(4,0);

  lcd.print("Hello, World");

  lcd.setCursor(2,1);

  lcd.print("LCD2004 I2C TEST");

   lcd.setCursor(0,2);

  lcd.print("Arduino LCM IIC 2004");

   lcd.setCursor(2,3);

  lcd.print("Always thank you.");

}

'3) Actuator > LCD' 카테고리의 다른 글

LCD Keypad Shield Green (LCD1602) [D043]  (0) 2016.09.21
LCD Keypad Shield (LCD1602) [D038]  (0) 2016.09.21
LCD2004 I2C ( LCD2004A) [D017]  (0) 2016.09.21
LCD1602 I2C (LCD1602) [D016]  (0) 2016.09.21
LCD1602 (HD44780) [D002]  (0) 2016.09.21
Posted by RDIoT
|

LCD2004 I2C ( LCD2004A) [D017]



https://www.youtube.com/watch?v=Yt-eYSfoH1M


*GitHub : https://github.com/rdiot/rdiot-d017.git



* Contents

- DataSheet : http://www.elecrow.com/download/2004%20Datasheet.pdf

- Connect

GND  ------------------  GND

VCC  ------------------   5V

SDA  ------------------   A4

SCL  ------------------   A5

: Mega(SDA-D20, SCL-D21), Leo(SDA-D2, SCL-D3)


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

 

LiquidCrystal_I2C lcd(0x27,20,4);  // set the LCD address to 0x20 for a 16 chars and 2 line display

 

void setup()

{

  lcd.init();                      // initialize the lcd 

  // Print a message to the LCD.

  lcd.backlight();

  lcd.setCursor(4,0);

  lcd.print("Hello, World");

  lcd.setCursor(2,1);

  lcd.print("LCD2004 I2C TEST");

   lcd.setCursor(0,2);

  lcd.print("Arduino LCM IIC 2004");

   lcd.setCursor(2,3);

  lcd.print("Always thank you.");

}

'3) Actuator > LCD' 카테고리의 다른 글

LCD Keypad Shield Green (LCD1602) [D043]  (0) 2016.09.21
LCD Keypad Shield (LCD1602) [D038]  (0) 2016.09.21
LCD2004 I2C Green (LCD2004A) [D046]  (0) 2016.09.21
LCD1602 I2C (LCD1602) [D016]  (0) 2016.09.21
LCD1602 (HD44780) [D002]  (0) 2016.09.21
Posted by RDIoT
|

LCD1602 I2C (LCD1602) [D016]



https://www.youtube.com/watch?v=xj6KmHnGYqE


*GitHubhttps://github.com/rdiot/rdiot-d016.git



* Contents

- Connect

GND  ------------------  GND

VCC  ------------------   5V

SDA  ------------------   A4 

SCL  ------------------   A5 

: Mega(SDA-D20, SCL-D21), Leo(SDA-D2, SCL-D3)


- DataSheet : http://www.elecrow.com/download/LCD1602.pdf


- Key Code

#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

 

LiquidCrystal_I2C lcd(0x27,16,2);  // set the LCD address to 0x20 for a 16 chars and 2 line display

 

void setup()

{

  lcd.init();                      // initialize the lcd 

 

  // Print a message to the LCD.

  lcd.backlight();

  lcd.print("Hello, world!");

  

  lcd.setCursor(0, 1);

 

  lcd.print("cursor 0,1");

}

'3) Actuator > LCD' 카테고리의 다른 글

LCD Keypad Shield Green (LCD1602) [D043]  (0) 2016.09.21
LCD Keypad Shield (LCD1602) [D038]  (0) 2016.09.21
LCD2004 I2C Green (LCD2004A) [D046]  (0) 2016.09.21
LCD2004 I2C ( LCD2004A) [D017]  (0) 2016.09.21
LCD1602 (HD44780) [D002]  (0) 2016.09.21
Posted by RDIoT
|