Go Down

Topic: New soft serial buffer maxes at 255 (Read 1 time) previous topic - next topic


Code: [Select]
HardwareSerial Uart = HardwareSerial();
There is already an instance of the HardwareSerial class, called Serial. Why are you creating a new one? This isn't even the proper way of doing it.

We seem to have gotten away from the thread topic. Is the point of this thread to illustrate how many ways you can do things wrong?

this was used by an example on PJRC website on how to use the teencyduino serial port. This drives the on board serial port which I use for the LCD.


I have no formal training in programming and do not do it at a professional level, so yes there will be a lot of mistakes...

here is a sample of return data where the return data goes funny at the longer string:

data1 =
Do you want to download updated firmware?

data2 =
data3 =
data4 =
data1 =
Do you want to select or change the operating mode of the unit?

data2 =
data3 =
data4 =
data1 =
Do you want to change the Dial Face of the unit?

data2 =
data3 =
data4 =
data1 = This utility allows a technican to describe the dial face to the meter.
The meter uses these values to determine the correct needle placement.
The OUTER set
data2 = of numbers on the dial is the MAIN scale (#1)
The INNER set of numbers on the dial is the DELTA, WOB or 2nd scale
The Main scale is always used in NORMAL MODE
data3 =
What is the second scale function? [Pick one letter from the list]
    A - Normal mode w/ alternate calibration eg: #of lines or English/Metric
    B - Del
data4 = m - Etrenivelveigmo
   C eg OitdeEr seit rrsefti
Fmoreinman suthwns ual


Code: [Select]

String data1;
String data2;
String data3;
String data4;

The String class is currently not safe to use; it can cause memory corruption leading to erratic behaviour. Since you're experiencing erratic behaviour, removing all use of String should be your first step.
I only provide help via the forum - please do not contact me for private consultancy.


One final question, before I bow out of this thread. Are you testing this code only on a non-Arduino? The Teensy is NOT an Arduino. It can be programmed using the Arduino IDE but there are differences in the hardware and the software serial handling.

If your problems are strictly limited to the Teensy, you should be on the prjc forum, not here.

changed from strings to char array and works good THANKS!

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131