glmyc 发表于 2014-11-27 22:33:23

mini RBoard 在TB上卖57-58元左右,比mini pro(10元左右)加几路继电器模块(2-8元)贵上不少,唯一好处就是一体。

yewencan 发表于 2014-11-28 20:23:30

      for (int i=0; i< 5; i++) bits = 0;

第二部分的这个地方报错是什么情况?
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Arduino: 1.0.6 (Windows 7), Board: "Arduino Uno"
sketch_nov28a.ino: In function 'int dht11_read(int)':
sketch_nov28a:166: error: incompatible types in assignment of 'int' to 'uint8_t '

ccggff123 发表于 2014-11-30 16:29:49

yewencan 发表于 2014-11-28 20:23 static/image/common/back.gif
for (int i=0; i< 5; i++) bits = 0;

第二部分的这个地方报错是什么情况?


我也一样,不知道什么原因,而且这个8266不是很稳定,烧了3个

yewencan 发表于 2014-11-30 21:17:28

ccggff123 发表于 2014-11-30 16:29 static/image/common/back.gif
我也一样,不知道什么原因,而且这个8266不是很稳定,烧了3个

你是电源问题吧 我从来没烧过

ITEAD创易工作室 发表于 2014-12-1 09:22:30

glmyc 发表于 2014-11-27 22:33 static/image/common/back.gif
mini RBoard 在TB上卖57-58元左右,比mini pro(10元左右)加几路继电器模块(2-8元)贵上不少,唯一好处就 ...

mini Rboard不是mini pro哦。是UNO。产品要是都去扒物料成本的话,都差不多。arduino的宗旨是开源创新,如果都只是想着低价,想着山寨,中国还能有进步吗?我知道这不是你一个人的心理,是整个社会的变态。对于这种什么价格问题,请不要再提,我也不想再回复。

ITEAD创易工作室 发表于 2014-12-1 09:28:01

yewencan 发表于 2014-11-28 20:23 static/image/common/back.gif
for (int i=0; i< 5; i++) bits = 0;

第二部分的这个地方报错是什么情况?


1.请确定库文件是这里下载的最新版:http://pan.baidu.com/s/1sj2nUyT
2.arduino IDE请使用1.0.5版本试试。1.0.6我们没有测试过。
3.ESP8266的VCC电源引脚必须连接3.3V,最好再加1A适配器,以防电流不够。

ITEAD创易工作室 发表于 2014-12-1 09:28:39

ccggff123 发表于 2014-11-30 16:29 static/image/common/back.gif
我也一样,不知道什么原因,而且这个8266不是很稳定,烧了3个

1.请确定库文件是这里下载的最新版:http://pan.baidu.com/s/1sj2nUyT
2.arduino IDE请使用1.0.5版本试试。1.0.6我们没有测试过。
3.ESP8266的VCC电源引脚必须连接3.3V,最好再加1A适配器,以防电流不够。

ccggff123 发表于 2014-12-1 09:35:08

ITEAD创易工作室 发表于 2014-12-1 09:28 static/image/common/back.gif
1.请确定库文件是这里下载的最新版:http://pan.baidu.com/s/1sj2nUyT
2.arduino IDE请使用1.0.5版本试 ...

早,我的是使用1.05的,也是最新的9600的库,不过执行代码的时候,还是一样这样的情况哦,大概会是那个环节有问题呢

lnhf6644 发表于 2014-12-1 13:22:04

sketch_dec01a.ino: In function 'int dht11_read(int)':
sketch_dec01a:165: error: incompatible types in assignment of 'int' to 'uint8_t '

yewencan 发表于 2014-12-1 13:22:57

ITEAD创易工作室 发表于 2014-12-1 09:28 static/image/common/back.gif
1.请确定库文件是这里下载的最新版:http://pan.baidu.com/s/1sj2nUyT
2.arduino IDE请使用1.0.5版本试 ...

库没下错,烧第一部分代码没有任何问题。1.05的报同样的问题

lnhf6644 发表于 2014-12-1 13:47:23

int dht11_read(int pin)
{
      // BUFFER TO RECEIVE
      uint8_t bits;
      uint8_t cnt = 7;
      uint8_t idx = 0;

      // EMPTY BUFFER
      for (int i=0; i< 5; i++) bits = 0;

sketch_dec01a.ino: In function 'int dht11_read(int)':
sketch_dec01a:166: error: incompatible types in assignment of 'int' to 'uint8_t '
请问,问题出在哪里

Paderboy 发表于 2014-12-1 19:59:07

int dht11_read(int pin)
{
      // BUFFER TO RECEIVE
      int bits;
      int cnt = 7;
      int idx = 0;

      // EMPTY BUFFER
      for (int i=0; i< 5; i++)
      {bits= 0;}

      // REQUEST SAMPLE
      pinMode(pin, OUTPUT);
      digitalWrite(pin, LOW);
      delay(18);
      digitalWrite(pin, HIGH);
      delayMicroseconds(40);
      pinMode(pin, INPUT);

      // ACKNOWLEDGE or TIMEOUT
      unsigned int loopCnt = 10000;
      while(digitalRead(pin) == LOW)
                if (loopCnt-- == 0) return -2;

      loopCnt = 10000;
      while(digitalRead(pin) == HIGH)
                if (loopCnt-- == 0) return -2;

      // READ OUTPUT - 40 BITS => 5 BYTES or TIMEOUT
      for (int i=0; i<40; i++)
      {
                loopCnt = 10000;
                while(digitalRead(pin) == LOW)
                        if (loopCnt-- == 0) return -2;

                unsigned long t = micros();

                loopCnt = 10000;
                while(digitalRead(pin) == HIGH)
                        if (loopCnt-- == 0) return -2;

                if ((micros() - t) > 40) bits |= (1 << cnt);
                if (cnt == 0)   // next byte?
                {
                        cnt = 7;    // restart at MSB
                        idx++;      // next byte!
                }
                else cnt--;
      }

      // WRITE TO RIGHT VARS
      // as bits and bits are allways zero they are omitted in formulas.
      humidity    = bits;
      temperature = bits;

      int sum = bits + bits;

      if (bits != sum) return -1;
      return 0;
}

yewencan 发表于 2014-12-1 21:46:20

本帖最后由 yewencan 于 2014-12-1 22:17 编辑

顶楼上:victory:按你的编译通过了。。。。明天试下功能,感谢创意工作室感谢楼上的!

ccggff123 发表于 2014-12-3 00:33:30

大家好,代码可以成功编译了,串口通讯的时候好像无法获取IP不知是什么原因,会不会是固件版本的问题,提示语如下:
AT+RST
Module is ready
reboot wifi is OK
]ˆìŽÿaäÏü‡ètxäà3üH‡Ç}
$ready
connection failed
disconnecting.

malqin 发表于 2014-12-3 03:48:24

AT+RST
AT+RST
Module have no response
Begin error
Init error
Connecting...
这是为什么呢?
页: 1 2 [3] 4 5 6 7 8
查看完整版本: 【库和教程】ESP8266 WIFI模块实现远程wifi控制(持续更新)