Invoice source code for Arduino: receipt totals in whole cents

For makers and stall sellers with an Arduino Mega and a 58 mm thermal printer. Type your lines below to get the totals, the tax per rate and the receipt exactly as the printer will print it. Set a quantity to 0 to drop a line.

ItemQtyUnit priceTax %

Invoice total

Your lines as the sketch's ITEMS[] block (cents, tax in basis points):

Why whole cents: on an Uno or Mega, float and double are the same 32-bit type. Adding 0.10 ten thousand times that way gives 999.9029 ($999.90); in cents it is $1,000.00. This page uses the same integer rounding as the sketches (half away from zero). The invoice number and date on the preview are samples; the sketches take the date you type and the next number from EEPROM.

Open full tool → getreadystack.com · Put this on your site with your logo