Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/sovcik/SerialPrinter
Browse files Browse the repository at this point in the history
  • Loading branch information
sovcik committed Jul 16, 2019
2 parents 8dcb4ee + 648f0b0 commit 0451958
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,12 @@ thp.writeBuffer();
```

**Query Printer Status**

First start automatic status polling

```
thp.startStatusUpdate(1000); // check interval in milliseconds
Inside your loop() call printer's status update method and query status.
```

Then inside your loop() call printer's loop() method and query status.
```
thp.loop();
if (millis()-lastUpdateTime > 5000){ // check status each 5 seconds
thp.updatePrinterStatus();
lastUpdateTime - millis();
}
if (thp.status() != status){
status = thp.status();
Serial.printf("Printer status changed=%x\n",status);
Expand Down

0 comments on commit 0451958

Please sign in to comment.