Need help printing " * " into the serialmonitor.

How do I print " * " if i put it into my code the serial monitor just prints out 276.

This is my code:

int numStart = 0;
int numEnd = 9;
int tahti = " * "; //I need to put the "*" things here.
void setup() {
Serial.begin(9600);
}

void loop() {
int Start;
if (numStart != numEnd) {
numStart++;
Serial.print(tahti);
delay(1000);
}
}

int tahti = " * ";

Change that to:

char tahti  = '*';

And try it.

groundFungus:

int tahti = " * ";

Change that to:

char tahti  = '*';

And try it.

It worked, Thanks.

(deleted)

If you want " * " use:

const char *tahti  = " * ";

or

const char tahti[]  = " * ";

If you don't need the spaces then any of these will work:

const char *tahti  = "*";
const char tahti[]  = "*";
const char tahti  = '*';

Hi, I need help modifying this code to make it print this ****




Here is the code:

int sivunPituus;
int numStart = 0;
int numEnd = 4;
char star = '*';
void setup() {
Serial.begin(9600);
}

void loop() {
if (numStart != numEnd) {
numStart++;
Serial.print(star);
}
}

You know how to print star now.

Try doing that a few times instead of just once.

Do you want to print "*" 4 times to give **** then print a newline and do it again ?

If so then count how many times you print "*" and if you have printed 4 print a newline character

void setup()
{
  Serial.begin(115200);
  Serial.print{" ****\n"
"                                                                                ****\n"
"                                                                                 ****\n"
"                                                                                 ****\n");
}

void loop() {}