Updated version of Jim Hamblen's Nokia LCD weather App. Updated to suport Yahoo!'s weather API instead of the Google API. Also removed extraneous Libraries.

Dependencies:   NetServices mbed spxml

Fork of weather_Nokia_LCD_display by jim hamblen

Embed: (wiki syntax)

« Back to documentation index

NokiaLCD Class Reference

NokiaLCD Class Reference

An interface for the 130x130 Nokia Mobile phone screens. More...

#include <NokiaLCD.h>

Public Types

enum  LCDType { LCD6100, LCD6610 }
 

LCD panel format.

More...

Public Member Functions

 NokiaLCD (PinName mosi, PinName sclk, PinName cs, PinName rst, LCDType type=LCD6100)
 Create and Nokia LCD interface, using a SPI and two DigitalOut interfaces.
int putc (int c)
 Write a character to the LCD.
int printf (const char *format,...)
 Write a formated string to the LCD.
void locate (int column, int row)
 Locate to a screen column and row.
void cls ()
 Clear the screen and locate to 0,0.
void pixel (int x, int y, int colour)
 Set a pixel on te screen.
void fill (int x, int y, int width, int height, int colour)
 Fill an area of the screen.
void foreground (int c)
 Set the foreground colour.
void background (int c)
 Set the background colour.

Detailed Description

An interface for the 130x130 Nokia Mobile phone screens.

 #include "mbed.h"
 #include "NokiaLCD.h"

 NokiaLCD lcd(p5, p7, p8, p9, NokiaLCD::6610); // mosi, sclk, cs, rst, type

 int main() {
     lcd.printf("Hello World!");
 }

Definition at line 41 of file NokiaLCD.h.


Member Enumeration Documentation

enum LCDType

LCD panel format.

Enumerator:
LCD6100 

Nokia 6100, as found on sparkfun board (default)

LCD6610 

Nokia 6610, as found on olimex board.

Definition at line 45 of file NokiaLCD.h.


Constructor & Destructor Documentation

NokiaLCD ( PinName  mosi,
PinName  sclk,
PinName  cs,
PinName  rst,
LCDType  type = LCD6100 
)

Create and Nokia LCD interface, using a SPI and two DigitalOut interfaces.

Parameters:
mosiSPI data out
sclkSPI clock
csChip Select (DigitalOut)
rstReset (DigitalOut)
typeThe LCDType to select driver chip variants

Definition at line 15 of file NokiaLCD.cpp.


Member Function Documentation

void background ( int  c )

Set the background colour.

Parameters:
c24-bit colour

Definition at line 441 of file NokiaLCD.cpp.

void cls (  )

Clear the screen and locate to 0,0.

Definition at line 286 of file NokiaLCD.cpp.

void fill ( int  x,
int  y,
int  width,
int  height,
int  colour 
)

Fill an area of the screen.

Parameters:
xhorizontal position from left
yvertical position from top
widthwidth in pixels
heightheight in pixels
colour24-bit colour in format 0x00RRGGBB

Definition at line 333 of file NokiaLCD.cpp.

void foreground ( int  c )

Set the foreground colour.

Parameters:
c24-bit colour

Definition at line 437 of file NokiaLCD.cpp.

void locate ( int  column,
int  row 
)

Locate to a screen column and row.

Parameters:
columnThe horizontal position from the left, indexed from 0
rowThe vertical position from the top, indexed from 0

Definition at line 254 of file NokiaLCD.cpp.

void pixel ( int  x,
int  y,
int  colour 
)

Set a pixel on te screen.

Parameters:
xhorizontal position from left
yvertical position from top
colour24-bit colour in format 0x00RRGGBB

Definition at line 305 of file NokiaLCD.cpp.

int printf ( const char *  format,
  ... 
)

Write a formated string to the LCD.

Parameters:
formatA printf-style format string, followed by the variables to use in formating the string.
int putc ( int  c )

Write a character to the LCD.

Parameters:
cThe character to write to the display