Hola quiero subir este codigo al Arduino y me da este error .
/*******************************************************************************
*
* Projeto 66: Display TM1637 como mostrador de temperatura - Arduino
* Author: Angelo Luis Ferreira
* Date: 09/05/2019 (mm/dd/AA)
*
*
squids.com.br/arduino
*
*******************************************************************************/
#include <TM1637Display.h>
#include <Thermistor.h>
TM1637Display display(2,3); // define os pinos 2 com CLK e 3 com DIO
const byte pinBut =12;
const byte pinPot = A0;
Thermistor temp(1); // termistor conectado na porta A1 (cria o objeto)
byte controle = 0;
uint32_t temporizador = 0;
float displayTemp;
// - A
// | | F B
// - G
// | | E C
// - D
const uint8_t DEGREEC[] = {
0x0, 0x0,
SEG_A | SEG_B | SEG_G | SEG_F, // Degree Symbol
SEG_A | SEG_F | SEG_E | SEG_D, // C
};
const uint8_t DEGREEF[] = {
0x0, 0x0,
SEG_A | SEG_B | SEG_G | SEG_F, // Degree Symbol
SEG_A | SEG_F | SEG_E | SEG_G, // F
};
void setup(){
pinMode(pinBut, INPUT_PULLUP);
Serial.begin(9600);
display.setBrightness(7);
}
void loop() {
brilho(); // ajusta brilho dos leds do display
float temperature = temp.getTemp(); //calcula a temperatura
float tempC = temperature; // Celsius
float tempF = ((temperature * 1.8)+32); // Converte para Fahrenheit
// verifica se o botão foi pressionado e muda o controle
if(!digitalRead(pinBut)) {
controle = !controle;
while (!digitalRead(pinBut)) { } //esperera soltar o botão
delay(50);
}
switch (controle) {
case 0:
displayTemp = tempC;
showTemperature(0);
break;
case 1:
displayTemp = tempF;
showTemperature(1);
}
}
void showTemperature(byte x) {
if ((millis() - temporizador) >=1000) {
Serial.println(displayTemp);
if (x==0) {
display.setSegments(DEGREEC); //Exibe o valor da variável
} else {
display.setSegments(DEGREEF); //Exibe o valor da variável
}
display.showNumberDec(displayTemp,false,2,0);
temporizador = millis();
}
}
void brilho() {
// Lê valor do potenciômetro (0 a 1023)
int valor = analogRead(pinPot);
// Converte valor do potenciêmtro para valor de 0 a 7
int potVal = map(valor, 0, 1023, 0, 7);
// Ajusta o brilho dos leds (segmentos) entre 0 e 7
display.setBrightness(potVal);
}