#include "Adafruit_ILI9341.h"
#include "SPI.h"
#include "Adafruit_GFX.h"
#define TFT_DC 2
#define TFT_CS 15
Adafruit_ILI9341 tft=Adafruit_ILI9341(TFT_CS,TFT_DC);
float val=0 ;
int analogPin=35;
void setup()
{
tft.begin();
tft.setCursor(5,120);
tft.setTextColor(ILI9341_YELLOW);
tft.setTextSize(2);
tft.println(" tensao de saida: ");
}
void loop()
{
val =(float) analogRead(35)*0.00080586;
tft.fillRect(5 ,150,80,16, ILI9341_BLACK);
tft.setCursor(5,150);
tft.print(val,4);
tft.print("V");
}