Thermal printer barcode problem

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
EnriqueCabrera
 
Posts: 2
Joined: Thu Jul 17, 2014 6:40 pm

Thermal printer barcode problem

Post by EnriqueCabrera »

Good afternoon, two months ago aproximandamente buy a thermal printer.
Yesterday I started testing with the libraries and examples, and these are the results:
Test.jpg
Test.jpg (49.7 KiB) Viewed 374 times
Any idea what is happening?
The power supply I'm using is this:
foto3.jpg
foto3.jpg (52.08 KiB) Viewed 374 times
Thank you!

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Re: Thermal printer barcode problem

Post by Franklin97355 »

What code are you running and just what are we looking at in the top picture? I don't have a printer so I don't know what it should look like. Have you tried pulling out about 6 inches of paper and trying again in case the paper is bad? It also says you need 1.5 amps of power so your power supply should be OK.

EnriqueCabrera
 
Posts: 2
Joined: Thu Jul 17, 2014 6:40 pm

Re: Thermal printer barcode problem

Post by EnriqueCabrera »

This is the code i am using:

Code: Select all

/*************************************************************************
  This is an Arduino library for the Adafruit Thermal Printer.
  Pick one up at --> http://www.adafruit.com/products/597
  These printers use TTL serial to communicate, 2 pins are required.

  Adafruit invests time and resources providing this open source code.
  Please support Adafruit and open-source hardware by purchasing products
  from Adafruit!

  Written by Limor Fried/Ladyada for Adafruit Industries.
  MIT license, all text above must be included in any redistribution.
 *************************************************************************/

// If you're using Arduino 1.0 uncomment the next line:
#include "SoftwareSerial.h"
// If you're using Arduino 23 or earlier, uncomment the next line:
//#include "NewSoftSerial.h"

#include "Adafruit_Thermal.h"
#include "adalogo.h"
#include "adaqrcode.h"
#include <avr/pgmspace.h>

int printer_RX_Pin = 5;  // This is the green wire
int printer_TX_Pin = 6;  // This is the yellow wire

Adafruit_Thermal printer(printer_RX_Pin, printer_TX_Pin);

void setup(){
  Serial.begin(9600);
  pinMode(7, OUTPUT); digitalWrite(7, LOW); // To also work w/IoTP printer
  printer.begin();

  // The following function calls are in setup(), but do not need to be.
  // Use them anywhere!  They're just here so they're run only one time
  // and not printed over and over.
  // Some functions will feed a line when called to 'solidify' setting.
  // This is normal.

  // Test inverse on & off
  printer.inverseOn();
  printer.println("Inverse ON");
  printer.inverseOff();

  // Test character double-height on & off
  printer.doubleHeightOn();
  printer.println("Double Height ON");
  printer.doubleHeightOff();

  // Set text justification (right, center, left) -- accepts 'L', 'C', 'R'
  printer.justify('R');
  printer.println("Right justified");
  printer.justify('C');
  printer.println("Center justified");
  printer.justify('L');
  printer.println("Left justified");

  // Test more styles
  printer.boldOn();
  printer.println("Bold text");
  printer.boldOff();

  printer.underlineOn(); 
  printer.println("Underlined text ");
  printer.underlineOff();

  printer.setSize('L');     // Set type size, accepts 'S', 'M', 'L'
  printer.println("Large"); // Print line
  printer.setSize('M');
  printer.println("Medium");
  printer.setSize('S');
  printer.println("Small");

  printer.justify('C');
  printer.println("normal\nline\nspacing");
  printer.setLineHeight(50);
  printer.println("Taller\nline\nspacing");
  printer.setLineHeight(); // Reset to default
  printer.justify('L');

  // Barcode examples
  printer.feed(1);
  // CODE39 is the most common alphanumeric barcode
  printer.printBarcode("ADAFRUT", CODE39);
  printer.setBarcodeHeight(100);
  // Print UPC line on product barcodes
  printer.printBarcode("123456789123", UPC_A);

  // Print the 75x75 pixel logo in adalogo.h
  printer.printBitmap(adalogo_width, adalogo_height, adalogo_data);

  // Print the 135x135 pixel QR code in adaqrcode.h
  printer.printBitmap(adaqrcode_width, adaqrcode_height, adaqrcode_data);
  printer.println("Adafruit!");
  printer.feed(1);

  printer.sleep();      // Tell printer to sleep
  printer.wake();       // MUST call wake() before printing again, even if reset
  printer.setDefault(); // Restore printer to defaults
}

void loop() {
}

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Thermal printer barcode problem

Post by adafruit »

please provide the adafruit order # with your purchase of the printer and thermal paper.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”