+void ping_pong() {
+ /* make sure it's really a ping */
+ if (sci_rx_buf[1] != 'I' ||
+ sci_rx_buf[2] != 'N' ||
+ sci_rx_buf[3] != 'G' ||
+ sci_rx_buf[4] != '\0') {
+ send_nack();
+ return;
+ }
+ /* respond with ack & pong */
+ wait_for_tx_free();
+ my_strncpy(sci_tx_buf, "PONG\n", BUFFER_LEN);
+ send_packet();
+}
+
+u16 last_coin_value;
+bool last_door_open;
+char display_buf[11];
+/* cur_motor[0] is 0 for nothing, or 1..10, or 0xff to say redraw.
+ * cur_motor[1] is 0..9 and only meaningful is cur_motor[0] != 0. */
+u8 cur_motor[2];
+