Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with SPI pin assignments on Challenger RP2040 LTE #44

Open
fordsman opened this issue Jan 17, 2024 · 0 comments
Open

Problem with SPI pin assignments on Challenger RP2040 LTE #44

fordsman opened this issue Jan 17, 2024 · 0 comments

Comments

@fordsman
Copy link

fordsman commented Jan 17, 2024

  • Arduino board: Challenger RP2040 LTE

  • Arduino IDE version (found in Arduino -> About Arduino menu): INSERT ARDUINO
    VERSION HERE

  • List the steps to reproduce the problem below (if possible attach a sketch or
    copy the sketch code in too):

Only white display in Aurdino but works in CircutPython if i remap the MISO pin
"spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=microcontroller.pin.GPIO20 )"

This is the Aurdino code i try:


#include <Adafruit_GFX.h>
#include <Adafruit_HX8357.h>

#define TFT_CS   9
#define TFT_DC   10
#define TFT_RST  -1 // Set TFT_RST to -1 if not used

Adafruit_HX8357 tft = Adafruit_HX8357(TFT_CS, TFT_DC, 20, 22, TFT_RST, 23);

void setup() {
Serial.begin(115200);
while (!Serial);  

Serial.println("3.5\" HX8357D FeatherWing Test!"); 

tft.begin();
delay(500);

  // read diagnostics (optional but can help debug problems)
uint8_t x = tft.readcommand8(HX8357_RDPOWMODE);
Serial.print("Display Power Mode: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(HX8357_RDMADCTL);
Serial.print("MADCTL Mode: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(HX8357_RDCOLMOD);
Serial.print("Pixel Format: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(HX8357_RDDIM);
Serial.print("Image Format: 0x"); Serial.println(x, HEX);
x = tft.readcommand8(HX8357_RDDSDR);
Serial.print("Self Diagnostic: 0x"); Serial.println(x, HEX); 

tft.setRotation(1); // Adjust the rotation as needed (0, 1, 2, 3)
tft.fillScreen(HX8357_BLACK);
tft.setTextColor(HX8357_WHITE);
tft.setTextSize(2);

tft.setCursor(50, 100); // Adjust the cursor position as needed
tft.println("Now it is working!");

}

void loop() {
delay(1000);
}


White display and zero(0) on all diagnostic values when using Challenger RP2040 LTE
Full function and proper diagnostic values when try with a Adafruit feather M4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant