【问题标题】:Intel Edison UART1 cannot export gpio 214Intel Edison UART1 无法导出 gpio 214
【发布时间】:2015-04-24 20:54:25
【问题描述】:

背景: 我正在使用“基本块”为爱迪生上的 UART2 控制台供电和访问。 我有一个带有草图的 arduino 块,用于将数据打印到串行。 https://www.sparkfun.com/products/13036

串行数据是从 arduino 传输的,我打算使用节点脚本来读取该数据并执行与网络相关的功能。 Intel Edison and NodeJS serial port communication: I am receiving strange characters

我尝试按照爱迪生串行说明进行操作: https://communities.intel.com/message/265411#265411

但是在第 2 行的 GPIO 配置中它已经失败了。

root@edison:~# echo -n "214" > /sys/class/gpio/export sh: write error: No such device

有趣的是,如果我从“Intel Edison and NodeJS...”问题中运行“uart.js”,我确实得到了数据,但这不是预期的:

<Buffer 84 e9 f3 f4 e1 ee c3 e5 7a 20 72 75 75 0d 0a 8d c5 f3 f3 c1 c7 e5 20 f3 e5 ee f4 7a 60 70 0d 0a c2 c5 e1 ed 40 e2 f2 cf eb e5 ce 7a 60 30 0d 0a> <Buffer 84 c9 f3 f4 e1> <Buffer ce e3 e5 7a 60 72 75 75 0d 0a 8d e5 f3 f3 e1 e7 c5 60 f3 c5 ce f4 3a 40 70 0d 0a 82 e5 c1 ed 60 e2 f2 ef eb c5 ee 7a 40 70 0d 0a>

最后使用 mraa.getPinCount(); 我总是得到 56。 (在网上搜索时发现)

感谢您的帮助!

【问题讨论】:

    标签: c++ node.js serial-port arduino intel-edison


    【解决方案1】:

    看来 115200 是 Edison 串口转 Arduino 模块的不可用波特率! 我将波特率设置为 9600 并成功获取了预期的数据。

    此外,Arduino 模块的 gpio 引脚为 130 和 131。(130==rx,131==tx) echo -n 130 > /sys/class/gpio/export //may not need, may already be exported echo -n 131 > /sys/class/gpio/export //may not need, may already be exported echo mode1 > /sys/kernel/debug/gpio_debug/gpio130/current_pinmux // potentially unneeded as well. echo mode1 > /sys/kernel/debug/gpio_debug/gpio131/current_pinmux // potentially unneeded as well. echo in > /sys/class/gpio/gpio130/direction echo out > /sys/class/gpio/gpio131/direction .. cat /dev/ttyMFD1

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-01-30
      • 1970-01-01
      • 2016-12-10
      • 1970-01-01
      • 2015-09-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多