1 /* Digital Scale Output. Written for Stamps.com Model 510 */
2 /* 5lb Digital Scale; any HID scale with Usage page 0x8d should work */
5 #include <hiduniversal.h>
8 #include "scale_rptparser.h"
10 // Satisfy the IDE, which needs to see the include statment in the ino too.
12 #include <spi4teensy3.h>
18 HIDUniversal Hid(&Usb);
20 ScaleEvents ScaleEvents(&LCD);
21 ScaleReportParser Scale(&ScaleEvents);
25 Serial.begin( 115200 );
26 #if !defined(__MIPSEL__)
27 while (!Serial); // Wait for serial port to connect - used on Leonardo, Teensy and other boards with built-in USB CDC serial connection
29 Serial.println("Start");
32 Serial.println("OSC did not start.");
34 // set up the LCD's number of rows and columns:
43 if (!Hid.SetReportParser(0, &Scale))
44 ErrorMessage<uint8_t>(PSTR("SetReportParser"), 1 );