PicoW on Waveshare LCD2 #3092
Selene53
started this conversation in
Raspberry Pi Pico
Replies: 0 comments
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.
-
Hello, I’m trying to get a Pico W working with a Waveshare LED2 Spi display . I can make it operational using the pico drivers but not the rpipicow drivers. I suspect there is some interference between the Pico WiFi board and the Waveshare SPi GPIO pins. Wifi works but not the display unless I use the the board=pico. but then I cant use the WiFi.
The display does no operate if I use the board=rpipicow (in platformIO) however the program does run.
here is the waveshare board:
https://www.waveshare.com/wiki/Template:Pico_LCD_2_Spec
I wonder if there are any workarounds
The Waveshare pins are as follows:
#define TFT_DC 8 // Data Command control pin·
#define TFT_CS 9 // Chip select control pin
#define TFT_SCLK 10
#define TFT_MOSI 11
//#define TFT_MISO 12
#define TFT_RST 12 // Reset pin (could connect to RST pin)
#define TFT_BL 13 // LED back-light
Thanks for any help
#include <Arduino.h>
#include "SPI.h"
#include "TFT_eSPI.h"
#include <WiFi.h>
#include <WebServer.h>
#include "funcs.h"
TFT_eSPI tft = TFT_eSPI();
const char *ssid = "mySSID";
const char *password = "myPassword";
void SetupWiFi()
{
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected.");
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
Serial.print("MAC address: ");
Serial.println(WiFi.macAddress());
Serial.println();
}
void setup(void) {
Serial.begin(115200);
delay(50);
Serial.println("Starting WiFi");
SetupWiFi();
Serial.println("Starting WiFi");
tft.begin();
tft.println("Starting display");
tft.setRotation(1);
}
void loop() {
Serial.println("In Loop "+String(millis()));
delay(50);
Serial.println(WiFi.localIP());
tft.fillScreen(TFT_BLACK);
tft.setTextWrap(false);
tft.setTextFont(7);
tft.setCursor(48,0);
tft.setTextColor(TFT_RED);
tft.setTextSize(2);
tft.println(fmtNum((float)millis()/(float)100,2,2));
tft.fillCircle(10,45,10,TFT_BLUE);
tft.setCursor(48,120);
tft.setTextColor(TFT_GREEN);
tft.setTextSize(2);
tft.println(fmtNum((float)millis()/(float)100,2,2));
tft.fillCircle(10,165,10,TFT_YELLOW);
delay(1000);
}
[env:rpipicow]
platform = raspberrypi
board = rpipicow ; (rpipicow) doesnt display (pico) does but there are no wifi driver
framework = arduino
lib_deps = bodmer/TFT_eSPI@^2.5.43
Beta Was this translation helpful? Give feedback.
All reactions