I bought this to get text to display on a monitor. I’m having two arduinos talk to each other through rf transmitters/receivers. I receive characters perfectly fine but I cannot get the characters I receive to display on the screen. I think it has to do with pointers and type conversions but I am not sure. Does anyone have any recommendations? My code to display in void loop() is:
uint8_t buf[VW_MAX_MESSAGE_LEN]; uint8_t buflen = VW_MAX_MESSAGE_LEN;
if (vw_get_message(buf, &buflen)) // Non-blocking {
int i;
int z=1;
digitalWrite(led_pin, HIGH); // Flash a light to show received good message
// Message with a good checksum received, print it.
for (i = 0; i < buflen; i++)
{
char myChar = buf[i];
drawstr(atxy(i,z), myChar);
}
z++;
digitalWrite(led_pin, LOW);
}
and the method drawstr is: static void drawstr(uint16_t addr, const char s) { while (s) {
uint16_t w = pgm_read_word(cp437_pic + 2 * *s);
GD.wr(addr, lowByte(w));
GD.wr(addr + 64, highByte(w));
s++, addr++;
} }
and a drawstr input that works is: drawstr(atxy(1, 1), “0)”);
Thanks in advance for any help!