Quick help on Fether seven seg display

So over all this is for a CNC machine I am adding a 3d printer extruder and hotplate. I have got my arduino PID controller to work for the heaters. Right now Im just trying to display my temp and set temp.

Now, this code is no where near done but I only need help on adding letters. It allows me to display BEEF, all other letters dont work. I want to display any letter that will show on a 7seg, or the ability too.

Then my only other goal is to display a letter prior to my temp/set readings. Meaning a letter prior to a variable. for example C237 or S278.

Thanks in advance

#include <Wire.h> // Enable this line if using Arduino Uno, Mega, etc.
#include <Adafruit_GFX.h>
#include "Adafruit_LEDBackpack.h"

Adafruit_7segment matrix = Adafruit_7segment();

void setup() {
#ifndef __AVR_ATtiny85__
  Serial.begin(9600);
  Serial.println("7 Segment Backpack Test");
#endif
  matrix.begin(0x70);
}

void loop() {

 If(POTCount != PrevPOTCount){     // this will be an average count of mutiple readings for hysteresis
  matrix.print(0xBEEF, HEX);    // Want BEEF  to Say ADJ or any other letters, only B,E,and F work
  matrix.writeDisplay();
  delay(500);

  // print a floating point 
  matrix.print(setPoint);          //this will be POT temp set point But Iwant a letter prior to temp setting
  matrix.writeDisplay();           
  delay(5000);
 }
 if(POTCount == PrevPOTCount){
   matrix.print("C",Temp);          //this will be current temp set point but I woulld like a C before my 3 digit C temp
  matrix.writeDisplay();
  delay(100);
 }
 
  }

Header

#ifndef Adafruit_LEDBackpack_h
#define Adafruit_LEDBackpack_h

#if (ARDUINO >= 100)
 #include "Arduino.h"
#else
 #include "WProgram.h"
#endif


 #include <Wire.h>

#include "Adafruit_GFX.h"

#define LED_ON 1
#define LED_OFF 0

#define LED_RED 1
#define LED_YELLOW 2
#define LED_GREEN 3
 


#define HT16K33_BLINK_CMD 0x80
#define HT16K33_BLINK_DISPLAYON 0x01
#define HT16K33_BLINK_OFF 0
#define HT16K33_BLINK_2HZ  1
#define HT16K33_BLINK_1HZ  2
#define HT16K33_BLINK_HALFHZ  3

#define HT16K33_CMD_BRIGHTNESS 0xE0

#define SEVENSEG_DIGITS 5


// this is the raw HT16K33 controller
class Adafruit_LEDBackpack {
 public:
  Adafruit_LEDBackpack(void);
  void begin(uint8_t _addr);
  void setBrightness(uint8_t b);
  void blinkRate(uint8_t b);
  void writeDisplay(void);
  void clear(void);

  uint16_t displaybuffer[8]; 

  void init(uint8_t a);
 protected:
  uint8_t i2c_addr;
};

class Adafruit_AlphaNum4 : public Adafruit_LEDBackpack {
 public:
  Adafruit_AlphaNum4(void);

  void writeDigitRaw(uint8_t n, uint16_t bitmask);
  void writeDigitAscii(uint8_t n, uint8_t ascii, boolean dot = false);

 private:


};

class Adafruit_24bargraph : public Adafruit_LEDBackpack {
 public:
  Adafruit_24bargraph(void);

  void setBar(uint8_t bar, uint8_t color);

 private:
};


class Adafruit_8x16matrix : public Adafruit_LEDBackpack, public Adafruit_GFX {
 public:
  Adafruit_8x16matrix(void);

  void drawPixel(int16_t x, int16_t y, uint16_t color);

 private:
};

class Adafruit_8x16minimatrix : public Adafruit_LEDBackpack, public Adafruit_GFX {
 public:
  Adafruit_8x16minimatrix(void);

  void drawPixel(int16_t x, int16_t y, uint16_t color);

 private:
};

class Adafruit_8x8matrix : public Adafruit_LEDBackpack, public Adafruit_GFX {
 public:
  Adafruit_8x8matrix(void);

  void drawPixel(int16_t x, int16_t y, uint16_t color);

 private:
};

class Adafruit_BicolorMatrix : public Adafruit_LEDBackpack, public Adafruit_GFX {
 public:
  Adafruit_BicolorMatrix(void);

  void drawPixel(int16_t x, int16_t y, uint16_t color);

 private:
};


#define DEC 10
#define HEX 16
#define OCT 8
#define BIN 2
#define BYTE 0

class Adafruit_7segment : public Adafruit_LEDBackpack {
 public:
  Adafruit_7segment(void);
  size_t write(uint8_t c);

  void print(char, int = BYTE);
  void print(unsigned char, int = BYTE);
  void print(int, int = DEC);
  void print(unsigned int, int = DEC);
  void print(long, int = DEC);
  void print(unsigned long, int = DEC);
  void print(double, int = 2);
  void println(char, int = BYTE);
  void println(unsigned char, int = BYTE);
  void println(int, int = DEC);
  void println(unsigned int, int = DEC);
  void println(long, int = DEC);
  void println(unsigned long, int = DEC);
  void println(double, int = 2);
  void println(void);
  
  void writeDigitRaw(uint8_t x, uint8_t bitmask);
  void writeDigitNum(uint8_t x, uint8_t num, boolean dot = false);
  void drawColon(boolean state);
  void printNumber(long, uint8_t = 2);
  void printFloat(double, uint8_t = 2, uint8_t = DEC);
  void printError(void);

  void writeColon(void);
    
 private:
  uint8_t position;
};
#endif // Adafruit_LEDBackpack_h

.CPP

#include <Wire.h>

#include "Adafruit_LEDBackpack.h"
#include "Adafruit_GFX.h"

#ifndef _BV
  #define _BV(bit) (1<<(bit))
#endif

#ifndef _swap_int16_t
#define _swap_int16_t(a, b) { int16_t t = a; a = b; b = t; }
#endif

static const uint8_t numbertable[] = {
 0x3F, /* 0 */
 0x06, /* 1 */
 0x5B, /* 2 */
 0x4F, /* 3 */
 0x66, /* 4 */
 0x6D, /* 5 */
 0x7D, /* 6 */
 0x07, /* 7 */
 0x7F, /* 8 */
 0x6F, /* 9 */
 0x77, /* a */
 0x7C, /* b */
 0x39, /* C */
 0x5E, /* d */
 0x79, /* E */
 0x71, /* F */
};

static const uint16_t alphafonttable[] PROGMEM =  {

0b0000000000000001,
0b0000000000000010,
0b0000000000000100,
0b0000000000001000,
0b0000000000010000,
0b0000000000100000,
0b0000000001000000,
0b0000000010000000,
0b0000000100000000,
0b0000001000000000,
0b0000010000000000,
0b0000100000000000,
0b0001000000000000,
0b0010000000000000,
0b0100000000000000,
0b1000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0000000000000000,
0b0001001011001001,
0b0001010111000000,
0b0001001011111001,
0b0000000011100011,
0b0000010100110000,
0b0001001011001000,
0b0011101000000000,
0b0001011100000000,
0b0000000000000000, //  
0b0000000000000110, // !
0b0000001000100000, // "
0b0001001011001110, // #
0b0001001011101101, // $
0b0000110000100100, // %
0b0010001101011101, // &
0b0000010000000000, // '
0b0010010000000000, // (
0b0000100100000000, // )
0b0011111111000000, // *
0b0001001011000000, // +
0b0000100000000000, // ,
0b0000000011000000, // -
0b0000000000000000, // .
0b0000110000000000, // /
0b0000110000111111, // 0
0b0000000000000110, // 1
0b0000000011011011, // 2
0b0000000010001111, // 3
0b0000000011100110, // 4
0b0010000001101001, // 5
0b0000000011111101, // 6
0b0000000000000111, // 7
0b0000000011111111, // 8
0b0000000011101111, // 9
0b0001001000000000, // :
0b0000101000000000, // ;
0b0010010000000000, // <
0b0000000011001000, // =
0b0000100100000000, // >
0b0001000010000011, // ?
0b0000001010111011, // @
0b0000000011110111, // A
0b0001001010001111, // B
0b0000000000111001, // C
0b0001001000001111, // D
0b0000000011111001, // E
0b0000000001110001, // F
0b0000000010111101, // G
0b0000000011110110, // H
0b0001001000000000, // I
0b0000000000011110, // J
0b0010010001110000, // K
0b0000000000111000, // L
0b0000010100110110, // M
0b0010000100110110, // N
0b0000000000111111, // O
0b0000000011110011, // P
0b0010000000111111, // Q
0b0010000011110011, // R
0b0000000011101101, // S
0b0001001000000001, // T
0b0000000000111110, // U
0b0000110000110000, // V
0b0010100000110110, // W
0b0010110100000000, // X
0b0001010100000000, // Y
0b0000110000001001, // Z
0b0000000000111001, // [
0b0010000100000000, // 
0b0000000000001111, // ]
0b0000110000000011, // ^
0b0000000000001000, // _
0b0000000100000000, // `
0b0001000001011000, // a
0b0010000001111000, // b
0b0000000011011000, // c
0b0000100010001110, // d
0b0000100001011000, // e
0b0000000001110001, // f
0b0000010010001110, // g
0b0001000001110000, // h
0b0001000000000000, // i
0b0000000000001110, // j
0b0011011000000000, // k
0b0000000000110000, // l
0b0001000011010100, // m
0b0001000001010000, // n
0b0000000011011100, // o
0b0000000101110000, // p
0b0000010010000110, // q
0b0000000001010000, // r
0b0010000010001000, // s
0b0000000001111000, // t
0b0000000000011100, // u
0b0010000000000100, // v
0b0010100000010100, // w
0b0010100011000000, // x
0b0010000000001100, // y
0b0000100001001000, // z
0b0000100101001001, // {
0b0001001000000000, // |
0b0010010010001001, // }
0b0000010100100000, // ~
0b0011111111111111,

};
void Adafruit_LEDBackpack::setBrightness(uint8_t b) {
  if (b > 15) b = 15;
  Wire.beginTransmission(i2c_addr);
  Wire.write(HT16K33_CMD_BRIGHTNESS | b);
  Wire.endTransmission();  
}

void Adafruit_LEDBackpack::blinkRate(uint8_t b) {
  Wire.beginTransmission(i2c_addr);
  if (b > 3) b = 0; // turn off if not sure
  
  Wire.write(HT16K33_BLINK_CMD | HT16K33_BLINK_DISPLAYON | (b << 1)); 
  Wire.endTransmission();
}

Adafruit_LEDBackpack::Adafruit_LEDBackpack(void) {
}

void Adafruit_LEDBackpack::begin(uint8_t _addr = 0x70) {
  i2c_addr = _addr;

  Wire.begin();

  Wire.beginTransmission(i2c_addr);
  Wire.write(0x21);  // turn on oscillator
  Wire.endTransmission();
  blinkRate(HT16K33_BLINK_OFF);
  
  setBrightness(15); // max brightness
}

void Adafruit_LEDBackpack::writeDisplay(void) {
  Wire.beginTransmission(i2c_addr);
  Wire.write((uint8_t)0x00); // start at address $00

  for (uint8_t i=0; i<8; i++) {
    Wire.write(displaybuffer[i] & 0xFF);    
    Wire.write(displaybuffer[i] >> 8);    
  }
  Wire.endTransmission();  
}

void Adafruit_LEDBackpack::clear(void) {
  for (uint8_t i=0; i<8; i++) {
    displaybuffer[i] = 0;
  }
}

/******************************* QUAD ALPHANUM OBJECT */

Adafruit_AlphaNum4::Adafruit_AlphaNum4(void) {

}

void Adafruit_AlphaNum4::writeDigitRaw(uint8_t n, uint16_t bitmask) {
  displaybuffer[n] = bitmask;
}

void Adafruit_AlphaNum4::writeDigitAscii(uint8_t n, uint8_t a,  boolean d) {
  uint16_t font = pgm_read_word(alphafonttable+a);

  displaybuffer[n] = font;

  /*
  Serial.print(a, DEC);
  Serial.print(" / '"); Serial.write(a);
  Serial.print("' = 0x"); Serial.println(font, HEX);
  */

  if (d) displaybuffer[n] |= (1<<14);
}

/******************************* 24 BARGRAPH OBJECT */

Adafruit_24bargraph::Adafruit_24bargraph(void) {

}

void Adafruit_24bargraph::setBar(uint8_t bar, uint8_t color) {
  uint16_t a, c;
 
  if (bar < 12)
    c = bar / 4;
  else 
    c = (bar - 12) / 4;

  a = bar % 4;
  if (bar >= 12)
    a += 4;
    
  //Serial.print("Ano = "); Serial.print(a); Serial.print(" Cath = "); Serial.println(c);
  if (color == LED_RED) {
    // Turn on red LED.
    displaybuffer[c] |= _BV(a);
    // Turn off green LED.
    displaybuffer[c] &= ~_BV(a+8);
  } else if (color == LED_YELLOW) {
    // Turn on red and green LED.
    displaybuffer[c] |= _BV(a) | _BV(a+8);
  } else if (color == LED_OFF) {
    // Turn off red and green LED.
    displaybuffer[c] &= ~_BV(a) & ~_BV(a+8);
  } else if (color == LED_GREEN) {
    // Turn on green LED.
    displaybuffer[c] |= _BV(a+8);
    // Turn off red LED.
    displaybuffer[c] &= ~_BV(a);
  } 
}


/******************************* 16x8 MATRIX OBJECT */

Adafruit_8x16matrix::Adafruit_8x16matrix(void) : Adafruit_GFX(8, 16) {
}

void Adafruit_8x16matrix::drawPixel(int16_t x, int16_t y, uint16_t color) {

 // check rotation, move pixel around if necessary
  switch (getRotation()) {
  case 2:
    _swap_int16_t(x, y);
    x = 16 - x - 1;
    break;
  case 3:
    x = 16 - x - 1;
    y = 8 - y - 1;
    break;
  case 0:
    _swap_int16_t(x, y);
    y = 8 - y - 1;
    break;
  }
  /*
  Serial.print("("); Serial.print(x);
  Serial.print(","); Serial.print(y);
  Serial.println(")");
  */

  if ((y < 0) || (y >= 8)) return;
  if ((x < 0) || (x >= 16)) return;

  if (color) {
    displaybuffer[y] |= 1 << x;
  } else {
    displaybuffer[y] &= ~(1 << x);
  }
}

/******************************* 16x8 MINI MATRIX OBJECT */

Sry 9000 characters max doing this in pieces

CPP continued...

Adafruit_8x16minimatrix::Adafruit_8x16minimatrix(void) : Adafruit_GFX(8, 16) {
}

void Adafruit_8x16minimatrix::drawPixel(int16_t x, int16_t y, uint16_t color) {

  if ((y < 0) || (x < 0)) return;
  if ((getRotation() % 2 == 0) && ((y >= 16) || (x >= 8))) return;
  if ((getRotation() % 2 == 1) && ((x >= 16) || (y >= 8))) return;


 // check rotation, move pixel around if necessary
  switch (getRotation()) {
  case 2:
    if (y >= 8) {
      x += 8;
      y -= 8; 
    }
     _swap_int16_t(x, y);
    break;
  case 3:
    x = 16 - x - 1;
    if (x >= 8) {
      x -= 8;
      y += 8; 
    }
    break;
  case 0:
    y = 16 - y - 1;
    x = 8 - x - 1;
    if (y >= 8) {
      x += 8;
      y -= 8; 
    }
     _swap_int16_t(x, y);
    break;
  case 1:
    y = 8 - y - 1;
    if (x >= 8) {
      x -= 8;
      y += 8; 
    }
    break;
  }

  if (color) {
    displaybuffer[x] |= 1 << y;
  } else {
    displaybuffer[x] &= ~(1 << y);
  }
}

/******************************* 8x8 MATRIX OBJECT */

Adafruit_8x8matrix::Adafruit_8x8matrix(void) : Adafruit_GFX(8, 8) {
}

void Adafruit_8x8matrix::drawPixel(int16_t x, int16_t y, uint16_t color) {
  if ((y < 0) || (y >= 8)) return;
  if ((x < 0) || (x >= 8)) return;

 // check rotation, move pixel around if necessary
  switch (getRotation()) {
  case 1:
    _swap_int16_t(x, y);
    x = 8 - x - 1;
    break;
  case 2:
    x = 8 - x - 1;
    y = 8 - y - 1;
    break;
  case 3:
    _swap_int16_t(x, y);
    y = 8 - y - 1;
    break;
  }

  // wrap around the x
  x += 7;
  x %= 8;


  if (color) {
    displaybuffer[y] |= 1 << x;
  } else {
    displaybuffer[y] &= ~(1 << x);
  }
}

/******************************* 8x8 BICOLOR MATRIX OBJECT */

Adafruit_BicolorMatrix::Adafruit_BicolorMatrix(void) : Adafruit_GFX(8, 8) {
}

void Adafruit_BicolorMatrix::drawPixel(int16_t x, int16_t y, uint16_t color) {
  if ((y < 0) || (y >= 8)) return;
  if ((x < 0) || (x >= 8)) return;

  switch (getRotation()) {
  case 1:
    _swap_int16_t(x, y);
    x = 8 - x - 1;
    break;
  case 2:
    x = 8 - x - 1;
    y = 8 - y - 1;
    break;
  case 3:
    _swap_int16_t(x, y);
    y = 8 - y - 1;
    break;
  }

  if (color == LED_GREEN) {
    // Turn on green LED.
    displaybuffer[y] |= 1 << x;
    // Turn off red LED.
    displaybuffer[y] &= ~(1 << (x+8));
  } else if (color == LED_RED) {
    // Turn on red LED.
    displaybuffer[y] |= 1 << (x+8);
    // Turn off green LED.
    displaybuffer[y] &= ~(1 << x);
  } else if (color == LED_YELLOW) {
    // Turn on green and red LED.
    displaybuffer[y] |= (1 << (x+8)) | (1 << x);
  } else if (color == LED_OFF) {
    // Turn off green and red LED.
    displaybuffer[y] &= ~(1 << x) & ~(1 << (x+8));
  }
}

/******************************* 7 SEGMENT OBJECT */
Adafruit_7segment::Adafruit_7segment(void) {
  position = 0;
}

void Adafruit_7segment::print(unsigned long n, int base)
{
  if (base == 0) write(n);
  else printNumber(n, base);
}

void Adafruit_7segment::print(char c, int base)
{
  print((long) c, base);
}

void Adafruit_7segment::print(unsigned char b, int base)
{
  print((unsigned long) b, base);
}

void Adafruit_7segment::print(int n, int base)
{
  print((long) n, base);
}

void Adafruit_7segment::print(unsigned int n, int base)
{
  print((unsigned long) n, base);
}

void  Adafruit_7segment::println(void) {
  position = 0;
}

void  Adafruit_7segment::println(char c, int base)
{
  print(c, base);
  println();
}

void  Adafruit_7segment::println(unsigned char b, int base)
{
  print(b, base);
  println();
}

void  Adafruit_7segment::println(int n, int base)
{
  print(n, base);
  println();
}

void  Adafruit_7segment::println(unsigned int n, int base)
{
  print(n, base);
  println();
}

void  Adafruit_7segment::println(long n, int base)
{
  print(n, base);
  println();
}

void  Adafruit_7segment::println(unsigned long n, int base)
{
  print(n, base);
  println();
}

void  Adafruit_7segment::println(double n, int digits)
{
  print(n, digits);
  println();
}

void  Adafruit_7segment::print(double n, int digits)
{
  printFloat(n, digits);
}


size_t Adafruit_7segment::write(uint8_t c) {

  uint8_t r = 0;

  if (c == '\n') position = 0;
  if (c == '\r') position = 0;

  if ((c >= '0') && (c <= '9')) {
    writeDigitNum(position, c-'0');
    r = 1;
  }

  position++;
  if (position == 2) position++;

  return r;
}

void Adafruit_7segment::writeDigitRaw(uint8_t d, uint8_t bitmask) {
  if (d > 4) return;
  displaybuffer[d] = bitmask;
}

void Adafruit_7segment::drawColon(boolean state) {
  if (state)
    displaybuffer[2] = 0x2;
  else
    displaybuffer[2] = 0;
}

void Adafruit_7segment::writeColon(void) {
    Wire.beginTransmission(i2c_addr);
    Wire.write((uint8_t)0x04); // start at address $02
    
    Wire.write(displaybuffer[2] & 0xFF);
    Wire.write(displaybuffer[2] >> 8);

    Wire.endTransmission();
}

void Adafruit_7segment::writeDigitNum(uint8_t d, uint8_t num, boolean dot) {
  if (d > 4) return;

  writeDigitRaw(d, numbertable[num] | (dot << 7));
}

void Adafruit_7segment::print(long n, int base)
{
  printNumber(n, base);
}

void Adafruit_7segment::printNumber(long n, uint8_t base)
{
    printFloat(n, 0, base);
}

void Adafruit_7segment::printFloat(double n, uint8_t fracDigits, uint8_t base) 
{ 
  uint8_t numericDigits = 4;   // available digits on display
  boolean isNegative = false;  // true if the number is negative
  
  // is the number negative?
  if(n < 0) {
    isNegative = true;  // need to draw sign later
    --numericDigits;    // the sign will take up one digit
    n *= -1;            // pretend the number is positive
  }
  
  // calculate the factor required to shift all fractional digits
  // into the integer part of the number
  double toIntFactor = 1.0;
  for(int i = 0; i < fracDigits; ++i) toIntFactor *= base;
  
  // create integer containing digits to display by applying
  // shifting factor and rounding adjustment
  uint32_t displayNumber = n * toIntFactor + 0.5;
  
  // calculate upper bound on displayNumber given
  // available digits on display
  uint32_t tooBig = 1;
  for(int i = 0; i < numericDigits; ++i) tooBig *= base;
  
  // if displayNumber is too large, try fewer fractional digits
  while(displayNumber >= tooBig) {
    --fracDigits;
    toIntFactor /= base;
    displayNumber = n * toIntFactor + 0.5;
  }
  
  // did toIntFactor shift the decimal off the display?
  if (toIntFactor < 1) {
    printError();
  } else {
    // otherwise, display the number
    int8_t displayPos = 4;
    
    if (displayNumber)  //if displayNumber is not 0
    {
      for(uint8_t i = 0; displayNumber || i <= fracDigits; ++i) {
        boolean displayDecimal = (fracDigits != 0 && i == fracDigits);
        writeDigitNum(displayPos--, displayNumber % base, displayDecimal);
        if(displayPos == 2) writeDigitRaw(displayPos--, 0x00);
        displayNumber /= base;
      }
    }
    else {
      writeDigitNum(displayPos--, 0, false);
    }
  
    // display negative sign if negative
    if(isNegative) writeDigitRaw(displayPos--, 0x40);
  
    // clear remaining display positions
    while(displayPos >= 0) writeDigitRaw(displayPos--, 0x00);
  }
}

void Adafruit_7segment::printError(void) {
  for(uint8_t i = 0; i < SEVENSEG_DIGITS; ++i) {
    writeDigitRaw(i, (i == 2 ? 0x00 : 0x40));
  }
}

Hi,

What model Arduino and what display are you using?

We just need you .ino code.
Where are you reading Potcount?
In you first IF loop you need to put;

PrevPOTCount = POTCount;

Also

matrix.print(0xBEEF, HEX);

Need to be;

matrix.print(settempVal);

If settempVal is the variable storing your setpoint.
Can you please tell us your electronics, programming, Arduino, hardware experience?
Tom... :slight_smile:

Hi yes, I am using an arduino mini pro with the Adafruit 0.56" 4-Digit 7-Segment Display w/ FeatherWing Combo Pack.

I know the pot variable is not completed, Like I said Its far from done. all that I can handle no problem at all.

My main goal is
When I move the Pot up or down I want it to flash ADJ for a set time then swap to S"Variable" telling me my SetPoint "S---". Once this SetPoint has not changed for a few seconds it will revert back to actual temp maybe flash "CELC" then show my actual temp in C "C---" --- will be the changing variable.

All I need help with is why matrix.print(0xBEEF, HEX); will display BEEF, but when I write matrix.print(0x
HEAD, HEX); I get numbers.

I just dont understand the syntax. I do know if I write matrix.print(SetPoint); it will display that variable. I want to display letters. How do I do that?

Also How do I display a letter prior or after my variable. Say SetPoint is 230 How can I have this display H230? I would like the letter to stay fixed at all times as my SetPoint variable changes.

Im dying hear can somone please help I really wanted this up and running 3 day ago. Please and thanks you

nissan20det:
Im dying hear can somone please help I really wanted this up and running 3 day ago. Please and thanks you

Your deadline is not our concern!

In addition, matrix.print(variable, HEX) prints the hex number between 0x0000 and 0xffff.
It will not be able to print ADJ because ADJ is not a hex number.
neither is HEAD.
If you don't understand that, I suggest expanding your knowledge.

.

Your deadline is not our concern!

In addition, matrix.print(variable, HEX) prints the hex number between 0x0000 and 0xffff.
It will not be able to print ADJ because ADJ is not a hex number.
neither is HEAD.
If you don't understand that, I suggest expanding your knowledge

I didnt understand that thanks you, but is there no other way to accomplish this? I greatly apologize I stated Im late on this. I understand that is not your concern I just am in a hurry sry. Thank you for the response tho.

My experience is only about 3 years on and off with maybe 3 of 400 goals not succeeded.

Maye someone can explain this better to me:

class Adafruit_7segment : public Adafruit_LEDBackpack {
 public:
  Adafruit_7segment(void);
  size_t write(uint8_t c);

  void print(char, int = BYTE);
  void print(unsigned char, int = BYTE);
  void print(int, int = DEC);
  void print(unsigned int, int = DEC);
  void print(long, int = DEC);
  void print(unsigned long, int = DEC);
  void print(double, int = 2);
  void println(char, int = BYTE);
  void println(unsigned char, int = BYTE);
  void println(int, int = DEC);
  void println(unsigned int, int = DEC);
  void println(long, int = DEC);
  void println(unsigned long, int = DEC);
  void println(double, int = 2);
  void println(void);
  
  void writeDigitRaw(uint8_t x, uint8_t bitmask);
  void writeDigitNum(uint8_t x, uint8_t num, boolean dot = false);
  void drawColon(boolean state);
  void printNumber(long, uint8_t = 2);
  void printFloat(double, uint8_t = 2, uint8_t = DEC);
  void printError(void);

  void writeColon(void);
    
 private:
  uint8_t position;
};

Im sure you guys understand this right away

So Is there a possibility to print any show able letter on a 7seg with minimal coding and one prior to a variable.

I have tried matrix.print(char, int = BYTE); as matrix.print(S, SetPoint); and get ----. do I need = BYTE after my int?

Im am very iliterate, Im not seeking for anyone to code for my just explain how I do these char prints with a a variable at the same time.

Im sorry' I also know I needed to expand my knowledge' Im sure some one experience with this could take a look for 5 mins and see what I need to write syntax wise. Like I said I'm not asking for any one to write my code. Just how do I print letters and how do I print a char prior to a 3 digit variable. that's it thank you, again. I can trade your help with my many skills.

Performance engine 16 total 6 4cyl over 1000hp 2 v8's over 1850. I do CNC machining, use BOBCAD software. I do gun smithing, fit barrels, trigger jobs, cycling problems, And A crap to of welding, TIG, 98% of all metals an would be happy to help someone that helps me no problem for free!! I know my dead line means jack S**t to everyone but it does to me. that;s why Ill trade work if needed. I'm sure with all my skills I can make it worth your wile!

thanks again
Zach

Okay toake this much easier atho i would still lie to do what I wants prior.

If I type matrix.print(0xC, HEX); it will show ---C is this easier to make the 3 digit variable prior to the "C"?

Same thing with F matrix.print(0xF,HEX); displays as ---F So I would prefer F then my ---variable (F---). If i cant o well. So at least as of right now I have two letters that will be okay but now idealy can I change ---F to F---? still --- as my changing variable. ?

Hi,

Can you just post your code, not the library code please, just the .ino code and can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

What pin do you have the pot connected to?

Thanks... Tom... :slight_smile:

Hi,
Is this your display?

Tom... :slight_smile:

Hi,
If you need to control each digit, look in the sevseg example in the library and use the 2nd method.

Using matrix.writeDigitNum statement.

Tom.. :slight_smile:

The AdaFruit library you are using can only display 0..9, A..F on 7-seg displays.

It has/knows no patterns for other letters for 7-seg displays. If you had the 14-seg display, the library can display other letters on those displays.

Okay thank you very much for the response!!!!! I know It means nothing to you but Im trying to accomplished today..

Now yes as you sent that I did find that on my own like 10 is before your post. SO far I can now display any HEX letter A-F prior to my variable.. After testing I have this showing the letter C prior to my 3 digit variable. I am however getting s blink/strobe very fast not horrible but irritating. Way to get rid of that? I can, and have done a average of say 10-20 reading to slow number jitter but not refresh blinking rate, not sure if that will work this time. worth a try? maybe a easier route.

So It Seems I can now display C --- for temp (Would like ---C but cant figure it out) and A--- for when adjusting temp. thats okay I like A prior to the--- var.

I apologize for my ignorance but I have read through the pdf cpp an H and I just do understand 80% of it.

Next If I can is diplay ADJ for X amount of time when adjusting temp. then flash CELC when about to show temp. Thats my next step any thoughts. I see in the .cpp file there is a alphafonttable Is that what I need? I did try to write
matrix.print(0b0000000001110001,,BIN);
matrix.writeDisplay();

and it does not work, I get 113. but in cpp that says letter F???

Like I said I would love to trade skills I will make this worth you wile I promise!!!!

Thank you again!!!!

Hi,

I apologize for my ignorance but I have read through the pdf cpp an H and I just do understand 80% of it.

You don't have to if you look at the examples and check Adafruit for tutorials.

Good to hear you have made progress. :slight_smile: :slight_smile:

Tom..... :slight_smile:

Yup Finally getting somewhere. Next order of business is over all letters.

What is this in the .CPP file? Is this a way to display letters in binary?
I have tried matrix.print(0b0010100000110110, BIN); and it doesn't work.
in lame-ins terms can someone explain the purpose of this table and how to use it(Syntax wise )?

static const uint16_t alphafonttable[] PROGMEM =  {
0b0000000011110111, // A
0b0001001010001111, // B
0b0000000000111001, // C
0b0001001000001111, // D
0b0000000011111001, // E
0b0000000001110001, // F
0b0000000010111101, // G
0b0000000011110110, // H
0b0001001000000000, // I
0b0000000000011110, // J
0b0010010001110000, // K
0b0000000000111000, // L
0b0000010100110110, // M
0b0010000100110110, // N
0b0000000000111111, // O
0b0000000011110011, // P
0b0010000000111111, // Q
0b0010000011110011, // R
0b0000000011101101, // S
0b0001001000000001, // T
0b0000000000111110, // U
0b0000110000110000, // V
0b0010100000110110, // W
0b0010110100000000, // X
0b0001010100000000, // Y
0b0000110000001001, // Z
}

OKAY!!!!! Getting a tone closer so that alpha font table is a letter code, Some are wrong tho but this is what I got.
This displays HEAd capitol D looks like 0 so ehh w/e..

But My thought now, is that table there for representation or to make a variable.

If I write -- int H = 0b0000000011110110;
I can then write --- matrix.writeDigitRaw(0,H);
Much easier, but do I need to make that variable table or does this it exist in this alphafonttable and I am just using the wrong syntax?

#include <Wire.h> // Enable this line if using Arduino Uno, Mega, etc.
#include <Adafruit_GFX.h>
#include "Adafruit_LEDBackpack.h"
char S = 0b0000000011101101;
Adafruit_7segment matrix = Adafruit_7segment();
int inRead = A1;
int PotVal = 0;

void setup() {
#ifndef __AVR_ATtiny85__
  Serial.begin(9600);
  Serial.println("7 Segment Backpack Test");
#endif
  matrix.begin(0x70);
}

void loop() {
 PotVal = map(analogRead(inRead), 0 ,1024,0,300);
  int POT = constrain( PotVal, 0 , 300);
   matrix.writeDigitRaw(0,0b0000000011110110); // H
   matrix.writeDisplay();
  matrix.writeDigitRaw(1,0b0000000011111001); // E
   matrix.writeDisplay();
   matrix.writeDigitRaw(3,0b0000000011110111);// A
   matrix.writeDisplay();
   matrix.writeDigitRaw(4,0b000010001011110); // d
   matrix.writeDisplay();
  delay(0);
  
}

Sweet okay I got it I was way more work then Im sure was needed but here we go, All these letters work with location prior.

int A = 0b0000000001110111;
int B = 0b0001001001111111;
int C = 0b0000000000111001;
int D = 0b0001001000111111;
int E = 0b0000000001111001;
int F = 0b0000000001110001;
int G = 0b0000000000111101;
int H = 0b0000000001110110;
int I = 0b0001001000000000;
int J = 0b0000000000011110;
int L = 0b0000000000111000;
int N = 0b0010000100110111;
int O = 0b0001001000111111;
int P = 0b0000000001110011;
int R = 0b0010000001010000; 
int S = 0b0000000001101101;
int U = 0b0000000000111110;
int Y =    0b0001010101110010;
int Dash = 0b0000000001000000;
int UnderS = 0b0000000000001000;