My colleague and I are working on a Software Define Transceiver using the Teensy 4.1. He wanted to print out a value, val[], which is an unsigned long. This code fragment illustrates what I saw:
The answer is displayed as 2. If I remove the second parameter in the print() method, it displays correctly. I'm curious why the value 2 is printed above.
Code:
#include <SPI.h>
#include <RA8875.h> // https://github.com/mjs513/RA8875/tree/RA8875_t4
RA8875 tft = RA8875(10, 9);
void setup() {
unsigned long val[] = {50, 500};
tft.begin(RA8875_800x480, 8, 20000000UL, 4000000UL); // parameter list from library code
tft.setCursor(100, 100);
tft.print(val[0], 0);
}
void loop() {
}
The answer is displayed as 2. If I remove the second parameter in the print() method, it displays correctly. I'm curious why the value 2 is printed above.