Replies: 1 comment 2 replies
-
I have updated the master to resolve this. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've got the following setup on a RP2040 / Raspberry Pie Pico. It works when I only initialize the tft_eSPI library but doesn't work when I also initialize SoftwareSerial.:
#define USER_SETUP_INFO "User_Setup" #define TFT_PARALLEL_16_BIT #define ILI9486_DRIVER #define TFT_CS 18 // Chip select control pin (library pulls permanently low #define TFT_DC 19 // Data Command control pin - must use a pin in the range 0-31 #define TFT_RST 20 // Reset pin, toggles on startup #define TFT_WR 21 // Write strobe control pin - must use a pin in the range 0-31 #define TFT_D0 0 // Must use pins in the range 0-31 for the data bus #define TFT_D1 1 // so a single register write sets/clears all bits. #define TFT_D2 2 // Pins can be randomly assigned, this does not affect #define TFT_D3 3 // TFT screen update performance. #define TFT_D4 4 #define TFT_D5 5 #define TFT_D6 6 #define TFT_D7 7 #define TFT_D8 8 // Must use pins in the range 0-31 for the data bus #define TFT_D9 9 // so a single register write sets/clears all bits. #define TFT_D10 10 // Pins can be randomly assigned, this does not affect #define TFT_D11 11 // TFT screen update performance. #define TFT_D12 12 #define TFT_D13 13 #define TFT_D14 14 #define TFT_D15 15 #define SMOOTH_FONT #define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
Output of Read_User_seup is:
20:14:39.239 -> [code]
20:14:39.239 -> TFT_eSPI ver = 2.5.0
20:14:39.239 -> Processor = RP2040
20:14:39.239 -> Transactions = Yes
20:14:39.239 -> Interface = Parallel
20:14:39.239 -> Display driver = 9486
20:14:39.239 -> Display width = 320
20:14:39.239 -> Display height = 480
20:14:39.239 ->
20:14:39.239 -> TFT_CS = GPIO 18
20:14:39.239 -> TFT_DC = GPIO 19
20:14:39.239 -> TFT_RST = GPIO 20
20:14:39.239 -> TFT_WR = GPIO 21
20:14:39.239 ->
20:14:39.239 -> TFT_D0 = GPIO 0
20:14:39.239 -> TFT_D1 = GPIO 1
20:14:39.239 -> TFT_D2 = GPIO 2
20:14:39.239 -> TFT_D3 = GPIO 3
20:14:39.239 -> TFT_D4 = GPIO 4
20:14:39.239 -> TFT_D5 = GPIO 5
20:14:39.239 -> TFT_D6 = GPIO 6
20:14:39.239 -> TFT_D7 = GPIO 7
20:14:39.239 ->
20:14:39.239 -> TFT_BL = GPIO 22
20:14:39.239 -> TFT_BACKLIGHT_ON = HIGH
20:14:39.239 ->
20:14:39.239 -> Font GLCD loaded
20:14:39.239 -> Smooth font enabled
20:14:39.239 ->
20:14:39.239 -> [/code]
The basic code I have looks like this (Arduino IDE):
#include <TFT_eSPI.h> // Hardware-specific library
#include "Free_Fonts.h" // Include the header file attached to this sketch
TFT_eSPI tft = TFT_eSPI(); // Invoke custom library with default width and height
#include "SoftwareSerial.h"
SoftwareSerial vesc_serial(17 , 16); // RX, TX
void setup() {
Serial.begin(115200) // for usb to serial debug
vesc_serial.begin(19200);
Serial.println("Loaded vesc_serial");
tft.begin(); ///<--- This is breaking thingsss ?
tft.setRotation(1);
Serial.println("end of setup");
}
void loop() {
delay(5000);
Serial.println("Free: ");
Serial.print(rp2040.getFreeHeap());
}
The Pico seems to crash at runtime when I include both vesc_serial.begin(19200); and tft.begin();. Having only tft.begin(); works and having only vesc_serial.begin(19200); works. There must be a clash somewhere with those two libraries, Does anyone have any ideas?
Beta Was this translation helpful? Give feedback.
All reactions