       tft.set_text_scale(saved);
     }
     else {
-      tft.set_cursor(10, 35);
+      textbox.set_caret(10, 35);
       cout.printf_P(PSTR("%d"), distance);
     }
   }

#ifdef USE_TFT

#undef putchar
#include "Cosa/SPI/ST7735R.hh"
#include "Cosa/IOStream.hh"
#include "Cosa/Font/FixedNums8x16.hh"
#include "Cosa/Icon/arduino_icon_96x32.h"

ST7735R tft;
IOStream cout(&tft);
uint16_t RED, GREEN, BLUE, YELLOW, CYAN, GRAY;

class Ping : private HCSR04 {

void tft_setup()
{
  tft.begin();
  textbox.set_text_scale(4);
  textbox.set_text_font(&fixednums8x16);
  tft.set_orientation(Canvas::LANDSCAPE);
  RED = tft.shade(Canvas::RED, 75);
  YELLOW = tft.shade(Canvas::YELLOW, 75);
