esp32 firmware for a toaster reflow oven WIP!!!!!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
reflower/main/nokia.h

66 lines
2.6 KiB

/* Pin definitions:
Most of these pins can be moved to any digital or analog pin.
DN(MOSI)and SCLK should be left where they are (SPI pins). The
LED (backlight) pin should remain on a PWM-capable pin. */
// SCE - Chip select, pin 3 on LCD.
// RST - Reset, pin 4 on LCD.
// DC - Data/Command, pin 5 on LCD.
// DN(MOSI) - Serial data, pin 6 on LCD.
// SCLK - Serial clock, pin 7 on LCD.
// LED - Backlight LED, pin 8 on LCD.
/* 84x48 LCD Defines: */
#define LCD_WIDTH 84 // Note: x-coordinates go wide
#define LCD_HEIGHT 48 // Note: y-coordinates go high
#define WHITE 0 // For drawing pixels. A 0 draws white.
#define BLACK 1 // A 1 draws black.
// This function sets a pixel on displayMap to your preferred
// color. 1=Black, 0= white.
void LCD_setPixel(int x, int y, bool bw);
// setLine draws a line from x0,y0 to x1,y1 with the set color
void LCD_setLine(int x0, int y0, int x1, int y1, bool bw);
// setRect will draw a rectangle from x0,y0 top-left corner to
// a x1,y1 bottom-right corner. Can be filled with the fill
// parameter, and colored with bw.
void LCD_setRect(int x0, int y0, int x1, int y1, bool fill, bool bw);
// setCircle draws a circle centered around x0,y0 with a defined
// radius. The circle can be black or white. And have a line
// thickness ranging from 1 to the radius of the circle.
void LCD_setCircle (int x0, int y0, int radius, bool bw, int lineThickness);
// This function will draw a char (defined in the ASCII table
// near the beginning of this sketch) at a defined x and y).
// The color can be either black (1) or white (0).
void LCD_setChar(char character, int x, int y, bool bw);
// setStr draws a string of characters, calling setChar with
// progressive coordinates until it's done.
// This function was grabbed from the SparkFun ColorLCDShield
// library.
void LCD_setStr(char * dString, int x, int y, bool bw);
// This function clears the entire display either white (0) or
// black (1).
// The screen won't actually clear until you call updateDisplay()!
void LCD_clearDisplay(bool bw);
// This will actually draw on the display, whatever is currently
// in the displayMap array.
void LCD_updateDisplay();
// Set contrast can set the LCD Vop to a value between 0 and 127.
// 40-60 is usually a pretty good range.
void LCD_setContrast(uint8_t contrast);
/* There are two ways to do this. Either through direct commands
to the display, or by swapping each bit in the displayMap array.
We'll leave both methods here, comment one or the other out if
you please. */
void LCD_invertDisplay();
//This sends the magical commands to the PCD8544
void LCD_setup(void);