Arduino错误所有重载的'println(long unsigned int(&)())'是不明确的

时间:2014-11-28 15:32:18

标签: c arduino

这是我的代码

#include<SPI.h>
#include<Ethernet.h>

byte mac[]={0xAA, 0xAB, 0xAC,0xAD, 0xAE, 0xAF};
IPAddress ip(192, 168, 1, 86);
EthernetClient client;
byte server[]={192, 168, 1, 61};

void setup()
{
  Serial.begin(9600);
  delay(1000);
  Ethernet.begin(mac, ip);
}

void loop()
{
  if(client.connect(server, 80))
  {
    client.println("GET /ardunio/ardComm.php?param=ping");
    client.println();
   client.stop();
  }
  Serial.println(millis);
}

这是错误

Serverping.ino:在函数'void loop()'中: Serverping.ino:24:24:错误:调用重载'println(long unsigned int(&amp;)())'是不明确的 Serverping.ino:24:24:注意:候选人是: 在/usr/share/arduino/hardware/arduino/cores/arduino/Stream.h:26:0中包含的文件中,                  来自/usr/share/arduino/hardware/arduino/cores/arduino/HardwareSerial.h:28,                  来自/usr/share/arduino/hardware/arduino/cores/arduino/Arduino.h:193,                  来自/usr/share/arduino/libraries/SPI/SPI.h:15,                  来自Serverping.ino:1: /usr/share/arduino/hardware/arduino/cores/arduino/Print.h:70:12:注意:size_t打印:: println(char)      size_t println(char);             ^ /usr/share/arduino/hardware/arduino/cores/arduino/Print.h:70:12:注意:参数1从'long unsigned int()'到'char'没有已知的转换 /usr/share/arduino/hardware/arduino/cores/arduino/Print.h:71:12:注意:size_t Print :: println(unsigned char,int)      size_t println(unsigned char,int = DEC);             ^ /usr/share/arduino/hardware/arduino/cores/arduino/Print.h:71:12:注意:参数1从'long unsigned int()'到'unsigned char'没有已知的转换 /usr/share/arduino/hardware/arduino/cores/arduino/Print.h:72:12:注意:size_t Print :: println(int,int)      size_t println(int,int = DEC);             ^ /usr/share/arduino/hardware/arduino/cores/arduino/Print.h:72:12:注意:参数1从'long unsigned int()'到'int'没有已知的转换 /usr/share/arduino/hardware/arduino/cores/arduino/Print.h:73:12:注意:size_t Print :: println(unsigned int,int)      size_t println(unsigned int,int = DEC);             ^ /usr/share/arduino/hardware/arduino/cores/arduino/Print.h:73:12:注意:参数1从'long unsigned int()'到'unsigned int'没有已知的转换 /usr/share/arduino/hardware/arduino/cores/arduino/Print.h:74:12:注意:size_t Print :: println(long int,int)      size_t println(long,int = DEC);             ^ /usr/share/arduino/hardware/arduino/cores/arduino/Print.h:74:12:注意:参数1从'long unsigned int()'到'long int'没有已知的转换 /usr/share/arduino/hardware/arduino/cores/arduino/Print.h:75:12:注意:size_t Print :: println(long unsigned int,int)      size_t println(unsigned long,int = DEC);             ^ /usr/share/arduino/hardware/arduino/cores/arduino/Print.h:75:12:注意:参数1从'long unsigned int()'到'long unsigned int'没有已知的转换

1 个答案:

答案 0 :(得分:2)

millis是一个功能。如果你想要调用它的结果,那么你需要调用它。

Serial.println(millis());