hey folks,
this drives me crazy....
i got this coding:
long randNumber;
char beaconName[10] = {'T', 'E', 'S', 'T', '_', '0', '0', '0', '0' };
void setup()
{
Serial.begin(57600);
randomSeed(analogRead(0));
randNumber = random(9);
beaconName[1] = char(randNumber);
beaconName[8] = 'X';
}
void loop()
{
Serial.println(beaconName);
Serial.println(char(randNumber));
}
The output is then:
TST_000X
What is happening?