hellovictoria 发表于 2015-4-16 14:27:03

(SKU:DFR0009)LCD Keypad Shield的例子程序在我的板子上不work

我把LCD的例子程序,烧写到我的板子上,不work。然后用别人的笔记本,编译烧写到我的Edison板子上,可以work。

wiring_digital-error: digitalWrite: can't index pinState with pin 9

wiring_digital-error: digitalWrite: can't index pinState with pin 8

variant-error: turnOffPWM: unknown pin4
wiring_digital-error: pinMode: can't set mux for pin4

wiring_digital-error: digitalWrite: can't index pinState with pin 4

variant-error: turnOffPWM: unknown pin5
wiring_digital-error: pinMode: can't set mux for pin5

wiring_digital-error: digitalWrite: can't index pinState with pin 5

variant-error: turnOffPWM: unknown pin6
wiring_digital-error: pinMode: can't set mux for pin6

wiring_digital-error: digitalWrite: can't index pinState with pin 6

variant-error: turnOffPWM: unknown pin7
wiring_digital-error: pinMode: can't set mux for pin7

wiring_digital-error: digitalWrite: can't index pinState with pin 7

wiring_digital-error: digitalWrite: can't index pinState with pin 9

wiring_digital-error: digitalWrite: can't index pinState with pin 9

wiring_digital-error: digitalWrite: can't index pinState with pin 9

variant-error: turnOffPWM: unknown pin4
wiring_digital-error: pinMode: can't set mux for pin4

wiring_digital-error: digitalWrite: can't index pinState with pin 4

variant-error: turnOffPWM: unknown pin5
wiring_digital-error: pinMode: can't set mux for pin5

wiring_digital-error: digitalWrite: can't index pinState with pin 5

variant-error: turnOffPWM: unknown pin6
wiring_digital-error: pinMode: can't set mux for pin6

wiring_digital-error: digitalWrite: can't index pinState with pin 6

variant-error: turnOffPWM: unknown pin7
wiring_digital-error: pinMode: can't set mux for pin7

wiring_digital-error: digitalWrite: can't index pinState with pin 7

wiring_digital-error: digitalWrite: can't index pinState with pin 9

wiring_digital-error: digitalWrite: can't index pinState with pin 9

wiring_digital-error: digitalWrite: can't index pinState with pin 9


hellovictoria 发表于 2015-4-16 14:28:55

我的报错信息如上所述,我是直接./sketch.elf后,报的错误信息!

Angelo 发表于 2015-4-16 15:26:08

应该是Arduino IDE的问题, 可以尝试重新安装一下:
http://www.intel.com/support/edison/sb/CS-035180.htm

另外Edison的固件也有更新过, 可以尝试跟着这个教程更新一下
http://www.intel.com/support/edison/sb/CS-035286.htm

丄帝De咗臂 发表于 2015-4-16 15:37:15

我表示看不懂报错信息

hellovictoria 发表于 2015-4-16 15:55:25

奇葩的问题还真是奇葩的解决了
    问题出在: Arduino IDE,编译出问题。
                     我的Arduino IDE 是 arduino-1.6.0+Intel
                        换成arduino-1.5.3-Intel.1.0.4,就O了,真奇葩。

Angelo 发表于 2015-5-21 14:31:47

本帖最后由 Angelo 于 2015-5-21 14:33 编辑

hellovictoria 发表于 2015-4-16 15:55
奇葩的问题还真是奇葩的解决了
    问题出在: Arduino IDE,编译出问题。
                     我的Ard ...
Edison 1.6.0 里面存在一个问题, LiquidCrystal这个类在构造函数里面调用了pinMode()函数,但此时 pinMode()函数还无法使用, 因此我们需要手动在 Setup 里面添加pinMode(), 让引脚变为输出模式

void LiquidCrystal::init(uint8_t fourbitmode, uint8_t rs, uint8_t rw, uint8_t enable,
                         uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3,
                         uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
{
_rs_pin = rs;
_rw_pin = rw;
_enable_pin = enable;

_data_pins = d0;
_data_pins = d1;
_data_pins = d2;
_data_pins = d3;
_data_pins = d4;
_data_pins = d5;
_data_pins = d6;
_data_pins = d7;

pinMode(_rs_pin, OUTPUT);
// we can save 1 pin by not using RW. Indicate by passing 255 instead of pin#
if (_rw_pin != 255) {
    pinMode(_rw_pin, OUTPUT);
}
pinMode(_enable_pin, OUTPUT);

if (fourbitmode)
    _displayfunction = LCD_4BITMODE | LCD_1LINE | LCD_5x8DOTS;
else
    _displayfunction = LCD_8BITMODE | LCD_1LINE | LCD_5x8DOTS;

begin(16, 1);
}一下是测试代码:
#include <LiquidCrystal.h>

LiquidCrystal lcd(8, 9, 4, 5, 6, 7);      // 初始化LCD的引脚号

void setup() {
    pinMode(8, OUTPUT);
    pinMode(9, OUTPUT);
    pinMode(4, OUTPUT);
    pinMode(5, OUTPUT);
    pinMode(6, OUTPUT);
    pinMode(7, OUTPUT);
lcd.begin(16, 2);// 设置LCD为2行,每行16个字符
}

void loop() {
lcd.setCursor(0, 0);
lcd.print("Hello");
delay(500);
}


hellovictoria 发表于 2015-5-22 14:10:58

Angelo 发表于 2015-5-21 14:31
Edison 1.6.0 里面存在一个问题, LiquidCrystal这个类在构造函数里面调用了pinMode()函数,但此时 pinMode( ...

我测试了下,是这样子的。强!
页: [1]
查看完整版本: (SKU:DFR0009)LCD Keypad Shield的例子程序在我的板子上不work