Git Product home page Git Product logo

arduino_st7735_fast's People

Contributors

cbm80amiga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

arduino_st7735_fast's Issues

Unable to compile for Arduino Due

When I try to compile the Hello World example for Arduino Due (both Programming Port and Native USB), it yields this error:
{ARDUINO DIRECTORY}/libraries/Arduino_ST7735_Fast-master/Arduino_ST7735_Fast.cpp: In member function 'void Arduino_ST7735::writeSPI(uint8_t)': {ARDUINO DIRECTORY}/libraries/Arduino_ST7735_Fast-master/Arduino_ST7735_Fast.cpp:113:5: error: 'SPDR' was not declared in this scope SPDR = c; ^ {ARDUINO DIRECTORY}/libraries/Arduino_ST7735_Fast-master/Arduino_ST7735_Fast.cpp: In member function 'void Arduino_ST7735::init()': {ARDUINO DIRECTORY}/libraries/Arduino_ST7735_Fast-master/Arduino_ST7735_Fast.cpp:143:10: error: cannot convert 'RwReg* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment dcPort = portOutputRegister(digitalPinToPort(dcPin)); ^ {ARDUINO DIRECTORY}/libraries/Arduino_ST7735_Fast-master/Arduino_ST7735_Fast.cpp:146:9: error: cannot convert 'RwReg* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment csPort = portOutputRegister(digitalPinToPort(csPin));
Compiling for the Arduino Uno is fine, but for my current project, it requires the Due. Is there any way to fix this, or is it something different with the board? Thanks in advance!

Smooth menu scrolling

First of all thanks for your fast library. Its really fast for smooth scrolling text. But I had an issue with smooth menu scrolling. When I pressed next or previous button the menu for next or previous menu item it made a little flickering which is unexpected for me. How can I solved it.
Here is my menu code:
` #include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library for ST7735
#include <SPI.h>
unsigned long startMillis, currentMillis;
// For the breakout board, you can use any 2 or 3 pins.
// These pins will also work for the 1.8" TFT shield.
#define TFT_CS 8
#define TFT_RST 7 // Or set to -1 and connect to Arduino RESET pin
#define TFT_DC 6
//-------------------Constants for row and column sizes-------------------
// For 1.44" and 1.8" TFT with ST7735 use:
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);
//Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);
//Adafruit_ST7735 tft = Adafruit_ST7735(8, 7, 10, 9, 6);
byte menuPos, menuScreen, markerPos, menuStartAt;
const char* const menu[12] PROGMEM = {"Binary to Decimal", "Binary to Octal", "Binary to Hexa Deci", "Decimal to Binary", "Decimal to Ocatl", "Decimal to Hexa Deci", "Octal to Binary",
"Octal to decimal", "Octal to Hexa Deci", "Hexa-Decimal to Binary", "Hexa-Decimal to Ocatl", "Hexa-Deci to Decimal"};
byte MENU_LENGTH = sizeof(menu) / sizeof(menu[0]);
#define btnEnt 4
#define btnUp 3
#define btnDwn 2
#define MENU_ROW_HEIGHT 12
#define LCD_ROWS 12
void setup() {
Serial.begin(9600);
pinMode(btnUp, INPUT_PULLUP);
pinMode(btnDwn, INPUT_PULLUP);
pinMode(btnEnt, INPUT_PULLUP);
tft.initR(INITR_BLACKTAB);
tft.fillScreen(ST77XX_BLACK);
delay(2000);
showMenu();
startMillis = millis();
}
void loop() {
currentMillis = millis();
if (isButtonDown(btnDwn) == true) {
if (menuPos < MENU_LENGTH - 1) {
menuPos++;
if (menuPos - menuStartAt > 12 )
menuStartAt++;
showMenu();
}
delay(100);
startMillis = currentMillis;
}
if (isButtonDown(btnUp) == true) {
if (menuPos > 0) {
menuPos--;
if (menuPos - menuStartAt < 0 && menuStartAt != 0)
menuStartAt--;
showMenu();
}
delay(100);
startMillis = currentMillis;
}

if (isButtonDown(btnEnt) == true) {
if (menuPos == 0) {
testF();
}
else if (menuPos == 1) {
showMenu();
}
else if (menuPos == 2) {
}
else if (menuPos == 3) {
showMenu();
}
else if (menuPos == 4) {

  showMenu();
}
else if (menuPos == 5) {
}
else if (menuPos == 6) {
  showMenu();
}
else if (menuPos == 7) {
  tft.println(F("Waiting to \nregister sim \ncard"));

  delay(1000);
} else if (menuPos == 8) {
  showMenu();
}
else if (menuPos == 9) {
  showMenu();
}
else if (menuPos == 10) {
}
else if (menuPos == 11) {
  tft.println(F("Waiting to \nregister sim \ncard"));
} else if (menuPos == 12) {
  showMenu();
}
else if (menuPos == 13) {
  showMenu();
}
delay(100);
startMillis = currentMillis = millis();

}
}
bool isButtonDown(byte pin) {
if (digitalRead(pin) == LOW) {
delay(30);
if (digitalRead(pin) == LOW)
return true;
return false;
}
return false;
}
void showMenu() {
for (byte i = menuStartAt; i < (menuStartAt + LCD_ROWS); i++) {
byte markerY = (i - menuStartAt) * MENU_ROW_HEIGHT;
if (i == menuPos) {
tft.setTextColor(ST77XX_BLACK);
tft.fillRect(0, markerY, tft.width(), MENU_ROW_HEIGHT, ST77XX_GREEN);
}
else {
tft.setTextColor(ST77XX_WHITE);
tft.fillRect(0, markerY, tft.width(), MENU_ROW_HEIGHT, ST77XX_BLACK);
}
if (i >= MENU_LENGTH)
continue;
tft.setCursor(3, markerY + 2);
tft.print((char*)pgm_read_word(&(menu[i])));
}
}
void testF(){
tft.fillScreen(ST77XX_BLACK);
tft.setTextColor(ST77XX_WHITE);
tft.setCursor(1, 1);
tft.println(F("Waiting to \nregister sim \ncard"));
delay(3000);
showMenu();
}`

How can I control both a 160x128 TFT LCD and a SD card using this library?

I were able to control my SD card and TFT LCD fine using the Adafruit libraries, but when I discovered that the Adafruit libraries were too slow for my tasks, I switched to Arduino_ST7735_Fast. And, when I run my code, the TFT LCD does not initialize properly and stays on a white screen, but the SD card can be read from and written to.

I would suggest you add commands to toggle the Chip Select of the LCD high or low so that I can control an SD card.

Crash on ESP8622

Hi, was trying a example ST7735_BigScroll.ino from the library, and it seem to crash after trying to render the scrolling text on nodemcu ESP8622 esp-12f with 1.8' (128x160) display.

I got RST line connected to 3.3v pin with a rezistor - doesnt make any difference if i connect it to a real pin

The serial output with Serial.setDebugOutput(true); if it helps with any troubleshooting
esp8266-Arduino_ST7735_Fast-master-serial-output.txt

Source code: esp8266-ST7735_BigScroll.txt

Video with output: https://user-images.githubusercontent.com/3987091/109518992-7b390080-7ab3-11eb-9b19-9d39cc01bd23.mp4

Any clues?

SAMD21

Hi, super library!

Will there be any support for the Arduino Zero samd21? I tried, but it failed to compile:

\Documents\Arduino\libraries\Arduino_ST7789_Fast-master\Arduino_ST7789_Fast.cpp: In member function 'void Arduino_ST7789::writeSPI(uint8_t)':

\Documents\Arduino\libraries\Arduino_ST7789_Fast-master\Arduino_ST7789_Fast.cpp:75:5: error: 'SPDR' was not declared in this scope

 SPDR = c;

 ^~~~

\Documents\Arduino\libraries\Arduino_ST7789_Fast-master\Arduino_ST7789_Fast.cpp:75:5: note: suggested alternative: 'SPI'

 SPDR = c;

 ^~~~

 SPI

In file included from \AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.5\cores\arduino/delay.h:23:0,

             from C:\Users\el\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.5\cores\arduino/Arduino.h:81,

\Documents\Arduino\libraries\Arduino_ST7789_Fast-master\Arduino_ST7789_Fast.h:16,

\Documents\Arduino\libraries\Arduino_ST7789_Fast-master\Arduino_ST7789_Fast.cpp:4:

\Documents\Arduino\libraries\Arduino_ST7789_Fast-master\Arduino_ST7789_Fast.cpp: In member function 'void Arduino_ST7789::commonST7789Init(const uint8_t*)':

\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.5\variants\arduino_zero/variant.h:68:55: error: cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment

#define portOutputRegister(port) ( &(port->OUT.reg) )

                                                   ^

\Documents\Arduino\libraries\Arduino_ST7789_Fast-master\Arduino_ST7789_Fast.cpp:169:12: note: in expansion of macro 'portOutputRegister'

dcPort = portOutputRegister(digitalPinToPort(dcPin));

        ^~~~~~~~~~~~~~~~~~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.