Commit 689a7b44 authored by Alan Marchiori's avatar Alan Marchiori
Browse files

added total output option to sketch

parent e63dac72
......@@ -57,16 +57,20 @@ void loop() {
char line1[30], line2[30];
struct change *c = make_change(amount);
amount += 0.01;
sprint_change(line1, line2, c);
lcd.clear();
lcd.setCursor(0,0);
//sprintf (line1, "%d.%02d", (int)amount, (int)(100*amount) % 100);
lcd.write(line1);
lcd.setCursor(0,1);
//sprintf (line2, "%d, %d, %d, %d", c->quarters, c->dimes, c->nickels, c->pennies);
lcd.write(line2);
free(c);
amount += 0.01;
delay(500);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment