hi.. just want know.. how to display on 7 Segment with the capital latter. exmpl

can i know the program....?

hi.. just want know.. how to display on 7 Segment with the capital latter. exmple A, B, C, D, E, F…………

Please stop cross-posting.

hi.. just want know.. how to display on 7 Segment with the capital later. exmple A, B, C, D, E, F…………
can i know the program....?

Have you got any code that displays the numbers from 0 to 9 that you can extend to show A to F ?

@azmi, STOP CROSS-POSTING.

i already post a new topic.. but suddenly come out with error.. this is my new topic "cannot disply 7 segment" but still same problem with error.. someone remove my topic.. my topic not in the list..

hi.. just want know.. how to display on 7 Segment with the capital later. exmple A, B, C, D, E, F…………

this code i use to diplay number 0-9… i use pin 7 until 13… it’ work…

char buffer[18];
int PinA = 7;
int PinB = 8;
int PinC = 9;
int PinD = 10;
int PinE = 11;
int PinF = 12;
int PinG = 13;

void setup()
{
  Serial.begin(9600);
  Serial.flush();
  pinMode(PinA, OUTPUT);
  pinMode(PinB, OUTPUT);
  pinMode(PinC, OUTPUT);
  pinMode(PinD, OUTPUT);
  pinMode(PinE, OUTPUT);
  pinMode(PinF, OUTPUT);
  pinMode(PinG, OUTPUT);
}

void loop()
{
  if (Serial.available() > 0) {
    int index=0;
    delay(100); // let the buffer fill up
    int numChar = Serial.available();
    if (numChar>3) {
      numChar=3;
    }
    while (numChar--) {
      buffer[index++] = Serial.read();
    }
    splitString(buffer);
  }
}

void splitString(char* data) 
{
  char* parameter;
  parameter = strtok (data, " ,");
  while (parameter != NULL) {
    setLED(parameter);
    parameter = strtok (NULL, " ,");
  }
  // Clear the text and serial buffers
  for (int x=0; x<4; x++) {
    buffer[x]='\0';
  }
  Serial.flush();
}

void setLED(char* data) {
  if (data[1] == '1') {
    int Ans = strtol(data+1, NULL, 10);
    Ans = constrain(Ans,0,255);
    
    digitalWrite(PinA, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinB, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinC, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinD, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinE, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinF, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinG, LOW);   // turn the LED on (HIGH is the voltage level)
  }
  if (data[1] == '2') {
    int Ans = strtol(data+1, NULL, 10);
    Ans = constrain(Ans,0,255);
    
    digitalWrite(PinA, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinB, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinC, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinD, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinE, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinF, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinG, HIGH);   // turn the LED on (HIGH is the voltage level)
   }
  if (data[1] == '3') {
    int Ans = strtol(data+1, NULL, 10);
    Ans = constrain(Ans,0,255);
    
    digitalWrite(PinA, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinB, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinC, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinD, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinE, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinF, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinG, HIGH);   // turn the LED on (HIGH is the voltage level)
  }
  if (data[1] == '4') {
    int Ans = strtol(data+1, NULL, 10);
    Ans = constrain(Ans,0,255);
    
    digitalWrite(PinA, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinB, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinC, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinD, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinE, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinF, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinG, HIGH);   // turn the LED on (HIGH is the voltage level)
  }
  if (data[1] == '5') {
    int Ans = strtol(data+1, NULL, 10);
    Ans = constrain(Ans,0,255);
    
    digitalWrite(PinA, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinB, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinC, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinD, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinE, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinF, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinG, HIGH);   // turn the LED on (HIGH is the voltage level)
  }
  if (data[1] == '6') {
    int Ans = strtol(data+1, NULL, 10);
    Ans = constrain(Ans,0,255);
    
    digitalWrite(PinA, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinB, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinC, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinD, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinE, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinF, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinG, HIGH);   // turn the LED on (HIGH is the voltage level)
  }
  if (data[1] == '7') {
    int Ans = strtol(data+1, NULL, 10);
    Ans = constrain(Ans,0,255);
    
    digitalWrite(PinA, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinB, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinC, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinD, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinE, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinF, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinG, LOW);   // turn the LED on (HIGH is the voltage level)
  }
  if (data[1] == '8') {
    int Ans = strtol(data+1, NULL, 10);
    Ans = constrain(Ans,0,255);
    
    digitalWrite(PinA, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinB, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinC, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinD, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinE, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinF, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinG, HIGH);   // turn the LED on (HIGH is the voltage level)
  }
  if (data[1] == '9') {
    int Ans = strtol(data+1, NULL, 10);
    Ans = constrain(Ans,0,255);
    
    digitalWrite(PinA, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinB, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinC, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinD, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinE, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinF, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinG, HIGH);   // turn the LED on (HIGH is the voltage level)
  }
  if (data[1] == '0') {
    int Ans = strtol(data+1, NULL, 10);
    Ans = constrain(Ans,0,255);
    
    digitalWrite(PinA, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinB, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinC, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinD, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinE, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinF, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinG, LOW);   // turn the LED on (HIGH is the voltage level)
  }
    if (data[1] == 0x2D) {
    int Ans = strtol(data+1, NULL, 10);
    Ans = constrain(Ans,0,255);
    
    digitalWrite(PinA, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinB, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinC, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinD, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinE, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinF, LOW);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinG, LOW);   // turn the LED on (HIGH is the voltage level)
  }
}

Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.

@azmi, STOP CREATING NEW TOPICS!

Responses to your request for help will go here on this topic.

pls help me on this code..

azmi:
can i know the program....?

What?

What 7-segment display?

How to use this forum

azmi:
pls help me on this code..

How many times have you asked this? Stop cross-posting and read the forum rules.

How to use this forum

  if (data[1] == '0') {
    int Ans = strtol(data+1, NULL, 10);
    Ans = constrain(Ans,0,255);
    
    digitalWrite(PinA, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinB, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinC, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinD, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinE, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinF, HIGH);   // turn the LED on (HIGH is the voltage level)
    digitalWrite(PinG, LOW);   // turn the LED on (HIGH is the voltage level)
  }

Leaving aside whatever you want/need to do with the Ans variable, this code, and that for each number, turns on the segments required to show the digit on the 7 seg display and turns off those not needed.

To display a different combination of segments, work out which should be on and which off, test for the value to be displayed and if found turn on/off the segments.

NOTE 1 - many of the comments do not match the code eg

    digitalWrite(PinG, LOW);   // turn the LED on (HIGH is the voltage level)

NOTE 2 - the code is very inefficient

azmi:
hi.. just want know.. how to display on 7 Segment with the capital later. exmple A, B, C, D, E, F…………

Because you are limited to 7 segments you can't display a Capital B that looks different from an 8 or Capital D that looks different from a 0. Usually those two are displayed as 'b' and 'd'.