岚衣 发表于 2015-11-4 16:50:18

我静态分配,但获取网页内容的时候就内容出现乱码了是啥情况啊?头文件可以读出来啊

zhuangzzy 发表于 2016-1-30 21:11:00

variable 'website' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

char website[] PROGMEM = "www.lucadentella.it";

请问这个问题怎么解决。。。

cjnt007 发表于 2016-4-12 16:51:43

zhuangzzy 发表于 2016-1-30 21:11 static/image/common/back.gif
variable 'website' must be const in order to be put into read-only section by means of '__attribute_ ...

前面说过了,加const

suoma 发表于 2016-9-4 16:30:53

张老师,为什么程序中的IP和返回来的IP不一样?
static byte myip[] = {192,168,1,10};
返回是192.168.1.7

NAO1980 发表于 2017-5-21 23:47:34

只显示

的这个问题我也遇到过了,现在解决了。因为例程中ether.bigin语句使用了默认的CS引脚,但是在学习前面的帖子时,CS连接到了10脚。所以出现了这个故障。
if (ether.begin(sizeof Ethernet::buffer, mymac) == 0)改为
if (ether.begin(sizeof Ethernet::buffer, mymac,10) == 0) 指定CS脚为10就可以了。
另外,可能是网站格式有变。缓冲区的头文件原来是207,现在变成了182。也就是说把语句改为
Serial.print((const char*) Ethernet::buffer + off + 182);
开始的时候网址那个地方编译不通过。根据错误提示添加const就OK了。
char const website[] PROGMEM= "www.lucadentella.it";

MWD--文化易人 发表于 2018-3-5 22:28:03

学习了,极客工坊是arduino爱好者之家,内容新颖丰富。实用例子多。
页: 1 2 3 [4]
查看完整版本: 【翻译教程】enc28J60 和 Arduino (3)——作为客户端