Hola a todos!! necesitaria que me echaseis una mano con la programacion puesto que no es lo mio y estoy empezando con ello. Estoy intentando usar una matriz Led para mostrar feeds rss a travaes de un script en Phyton. El Script envia los caracteres a traves del puerto de serie y el arduino los reproduce. He intentado almacenar los caracteres individualmente en un string, para luego mostrarlos en forma de scroll de derecha a izquierda. El efecto de scrolling me funciona bien con texto individual pero con los caracteres recibidos por el puerto de serie me da muchos errores, bien no me muestra el feed completo, bien se para, se reinicia o se superponen caracteres. Despues de varios dias dandole vueltas no me queda otra que pedir ayuda

Os copio el sketch:
#include "HT1632.h"
#define SCREEN_DATA 5
#define SCREEN_WR 4
#define SCREEN_CS 3
HT1632LEDMatrix screen(SCREEN_DATA, SCREEN_WR, SCREEN_CS);
char inData[30]; // Allocate some space for the string
char inChar; // Where to store the character read
byte index = 0; // Index into array; where to store the character
int x = 0;
char text[255];
int text_len = 0;
void setText(char message[], uint8_t length)
{
strncpy(text, message, length);
text[length] = 0;
text_len = length;
x = screen.width();
}
void setup() {
Serial.begin(19200); // opens serial port, sets data rate to 9600 bps
screen.begin(HT1632_COMMON_8NMOS);
screen.clearScreen();
screen.setCursor(0,0);
screen.setTextColor(1);
screen.setTextSize(1);
setText("my string ", 50);
}
void loop() {
if (Serial.available()) { // Check for incoming Serial Data
inChar = Serial.read(); // Read a character
inData[index] = inChar; // Store it
index++; // Increment where to write next
inData[index] = '\0'; // Null terminate the string
x -= 1;
delay(50);
screen.clearScreen();
screen.setCursor(x,0);
screen.println(inData); // Print the current byte in the serial
screen.writeScreen();
if (x < -(text_len * 6))
{
x = screen.width();
}
}
}
}
Gracias de antemano!