Contact me: hankecnc@gmail.com

如何使用Wire.h和另一个lcd库? #26

推推 grbl 3年前 (2023-01-25) 324次浏览

 关闭

如何使用Wire.h和另一个lcd库?#26

阿尔克斯 打开此问题 on Dec 5, 2011 ·11条评论

评论

如何使用Wire.h和另一个lcd库? #26

你好,

在下面的提交中,我尝试在另一个使用i2c的lcd系统中使用ultralcd的当前实现,该系统使用与LiquidCrystal方法调用兼容的arduino库:

铝合金 @1842ef0

在arduino 0022下编译,我遇到了这个错误:

In file included from Marlin.cpp:35:
ultralcd.h:19:22: error: Wire.h: No such file or directory
ultralcd.h:20:26: error: Deuligne.h: No such file or directory
In file included from Marlin.cpp:35:
ultralcd.h:20: error: 'Deuligne' does not name a type
ultralcd.h: In member function 'void MainMenu::updateActiveLines(const uint8_t&, volatile int&)':
ultralcd.h:95: error: 'lcd' was not declared in this scope
ultralcd.h: In member function 'void MainMenu::clearIfNecessary()':
ultralcd.h:131: error: 'lcd' was not declared in this scope

似乎找不到Wire.h,我尝试将Wire.h和Deuligne.h放入马林,然后它在编译期间找到它,但我遇到了另一个问题:

In file included from planner.cpp:66:
ultralcd.h:18: error: 'Deuligne' does not name a type
ultralcd.h: In member function 'void MainMenu::updateActiveLines(const uint8_t&, volatile int&)':
ultralcd.h:93: error: 'lcd' was not declared in this scope
ultralcd.h: In member function 'void MainMenu::clearIfNecessary()':
ultralcd.h:129: error: 'lcd' was not declared in this scope

关于如何正确地进行这种修改,你有什么建议吗?

更多关于Snootlab Deuligne的信息:

谢谢:)

亚历克斯

如何使用Wire.h和另一个lcd库? #26
贡献者

为什么不使用最新的arduino env,比如1.0或者至少23?也许这会有帮助。除此之外,我不能真正帮助你,因为我没有这个硬件,不能测试/尝试,真的没有这么多的时间.然而,LiquidCrystal的实际使用例程非常有限,并且可以很容易地替换:在文件中搜索”液晶显示器。”

如何使用Wire.h和另一个lcd库? #26
作者

嗨伯恩哈德,

感谢您的评论,我已经尝试了arduino 0023和1.0,没有成功。我尝试使用0022,因为它在马林文件夹中的Makefile中提到。

我会让你知道如果我成功地使用ultralcd与deuligne硬件,否则我会继续使用我自己的lcd库-https://github.com/alx/Marlin/blob/deuligne/Marlin/lcd.pde-但这是可耻的,你的似乎更好用:)

如何使用Wire.h和另一个lcd库? #26
贡献者

你好亚历克斯,

我从来没有看过这个展示,但我会看它这个星期。
如果它看起来不错,我会尝试将其添加到马林,并尝试检查编译错误来自哪里。

此致,

埃里克·货车德扎姆

2011年12月5日下午2点08分,亚历山大·吉拉德写道:

Hi,

In the following commit, I’m trying to use the current implementation of ultralcd with another lcd system that uses i2c, that uses an arduino lib compatible with LiquidCrystal method calls:

alx@1842ef0

Compiling under arduino 0022, I’ve got this error:

In file included from Marlin.cpp:35:
ultralcd.h:19:22: error: Wire.h: No such file or directory
ultralcd.h:20:26: error: Deuligne.h: No such file or directory
In file included from Marlin.cpp:35:
ultralcd.h:20: error: 'Deuligne' does not name a type
ultralcd.h: In member function 'void MainMenu::updateActiveLines(const uint8_t&, volatile int&)':
ultralcd.h:95: error: 'lcd' was not declared in this scope
ultralcd.h: In member function 'void MainMenu::clearIfNecessary()':
ultralcd.h:131: error: 'lcd' was not declared in this scope

It seems that Wire.h is not found, I’ve tried to place Wire.h and Deuligne.h in Marlin.pde, then it finds it during compilation, but I hit another issue:

In file included from planner.cpp:66:
ultralcd.h:18: error: 'Deuligne' does not name a type
ultralcd.h: In member function 'void MainMenu::updateActiveLines(const uint8_t&, volatile int&)':
ultralcd.h:93: error: 'lcd' was not declared in this scope
ultralcd.h: In member function 'void MainMenu::clearIfNecessary()':
ultralcd.h:129: error: 'lcd' was not declared in this scope

Would you have some hints about how to do this modification properly?

More details about Snootlab Deuligne:

Thanks :)

Alex


Reply to this email directly or view it on GitHub:
https://github.com/ErikZalm/Marlin/issues/26

如何使用Wire.h和另一个lcd库? #26
作者

经过一次新的尝试,我已经成功地通过移动马林文件夹中的Wire. h和Deuligne. h来删除编译错误,并迅速使代码变得比它应该的更脏。

但是,液晶显示器没有打开,也不可能通过Printrun连接到arduino。

我怀疑上传的代码在电路板上出现故障,无法打开串行连接,我将移回我的自定义lcd库,用新的马林实现它,即使我梦想有一天使用ultra_lcd库:)

如何使用Wire.h和另一个lcd库? #26
作者

下面是从Deuligne lib和马林编译示例时的不同调用:

https://raw.github.com/gist/2023450/c23a5ca8fb9e038f38238d5992bfbab8fd0e5b0e/gistfile1.txt

如您所见,该示例在其选项中获得Wire和Deuligne库的位置,但在马林的编译过程中什么也没有出现。这些选项是在arduino的什么地方创建的?

如何使用Wire.h和另一个lcd库? #26
作者

好的,我需要在马林.pde中声明对Wire和Deuligne lib的调用,以便在编译期间获取它们,离ultra_lcd支持更近了一步:)

如何使用Wire.h和另一个lcd库? #26
作者

很好,它编译和上传正确(仍然肮脏),但它不可能连接到打印机使用Printrun。

下面是编译日志:https://gist.github.com/2023523

我将尝试找到一种方法来了解当arduino初始化时发生了什么,并找到可能的错误。

如何使用Wire.h和另一个lcd库? #26
贡献者

你好亚历克斯。

谢谢你的移植。我过几天会检查的。

如何使用Wire.h和另一个lcd库? #26
作者

你好埃里克,

你觉得会不会是记忆问题?

下面是编译后的内存占用:

#define LCD
Binary sketch size: 85794 bytes (of a 258048 byte maximum)

//#define LCD
Binary sketch size: 63024 bytes (of a 258048 byte maximum)

#define BLOCK_BUFFER_SIZE 4
//#define LCD
Binary sketch size: 62646 bytes (of a 258048 byte maximum)

#define BLOCK_BUFFER_SIZE 4
#define LCD
Binary sketch size: 85416 bytes (of a 258048 byte maximum)

我已将当前不起作用的代码提交给 https://github.com/alx/Marlin
正在编译/上传,但激活LCD配置时,我仍然无法连接到串行端口。

不幸的是,我还没有尝试只激活ULTRA_LCD配置,以确保相同的问题不会出现与此配置。我一回到机器旁就试试。

如何使用Wire.h和另一个lcd库? #26
贡献者

(很久以前创建的问题;如果没有修复,则重新打开)

如何使用Wire.h和另一个lcd库? #26
吉图亚行动 机器人 评论的 on Apr 23, 2022

此问题已自动锁定,因为在关闭后没有任何近期活动。请为相关错误打开一个新问题。

如何使用Wire.h和另一个lcd库? #26 吉图亚行动 机器人 锁定和限制与协作者的对话 on Apr 23, 2022
喜欢 (0)