Articles Posted in the " " Category

  • if (Serial)

    if (Serial)

    描述 指定的串列埠是否可用。 在所有 86Duino 板子上,使用 if (Serial) 可以知道 USB CDC 虚拟序列埠是否已经被开启。对于其他硬体序列埠 (UART),例如使用 if (Serial1) 则总是回传 true。 语法 适用所有板子: if (Serial) if (Serial1) 适用 86Duino ONE: if (Serial2) if (Serial3) if (Serial485) 适用 86Duino EduCake: if (Serial2) if (Serial3) if (Serial232) 参数 回传 布林值:指定的序列埠假如是可用的状态时,则回传 true。假如 USB CDC 虚拟序列埠是不可用的状态,则回传 false。 范例 See also - Serial - […]


  • noInterrupts()

    noInterrupts()

    描述 关闭所有中断 (可以使用 Interrupts() 重启所有中断),中断让一些重要的任务可以在背景下执行,而它预设是开启的;当中断被关闭的时候,可能会造成一些函式不能正确运行,或者漏收的传进来的资料。由于中断会稍微断开主程式执行的时间,所以在主程式的临界区间中应该要关闭中断。 参数 回传 无回传值 范例 See also - Interrupts() 语法参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.


  • detachInterrupt()

    detachInterrupt()

    描述 关闭已启用的中断。 语法 detachInterrupt(interrupt) 参数 interrupt: 要关闭的中断之数字 (详见 attachInterrupt()) See also - attachInterrupt() 语法参考主页面 本页由热血青年 LBU 译自英文版。 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.


  • interrupts()

    interrupts()

    描述 重启所有中断 (例如:在 noInterrupts() 关闭所有中断之后呼叫),中断让一些重要的任务可以在背景下执行,而它预设是开启的;当中断被关闭的时候,可能会造成一些函式不能正确运行,或者漏收的传进来的资料。由于中断会稍微断开主程式执行的时间,所以在主程式的临界区间中应该要关闭中断。 参数 回传 无回传值 范例 See also - noInterrupts() - attachInterrupt() - detachInterrupt() 语法参考主页面 本页由热血青年 LBU 译自英文版。 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public […]


  • Serial

    Serial

    Serial 是让 86Duino 用来与电脑或其他装置沟通的管道;所有 86Duino 至少有一个串列埠 (也被称为 UART 或 USART)。Serial1 可藉由数位脚位 0 (RX) 和脚位 1 (TX) 与电脑通讯 (须经过一颗 USB-to-Serial TTL 转换晶片);若使用此功能,数位脚位 0 与脚位 1 则不能使用输入/输出功能。 你可以使用 86Duino 或 Arduino 开发环境下的串列监测功能与 86Duino 通讯。点击工具列的串列监测视窗图示,并设定和程式中 begin() 相同的鲍率。 86Duino ONE 和 EduCake 拥有两组额外的串列埠:Serial2 在脚位 17 (RX) 和脚位 16 (TX),而 Serial3 在脚位 15 (RX) 和脚位 14 (TX)。若要使用这些串列埠与你的个人电脑通讯,必须在个人电脑上加装一个 USB-to-Serial TTL 转换装置;若要与外部的 […]


  • Stream

    Stream

    Stream 是字元及二进制串流的基础类别,它不会被使用者直接呼叫到,而是在使用一个有依赖它的函式时,才会被呼叫。 在 86Duino 中 Stream 定义了读取函式,当使用到 read() 或类似方法的核心功能时,你可以放心的假设它会呼叫 Stream 类别;例如: print() 函式,Stream 类别会继承 Print 类别。 下列有一些范例类别是依赖 Stream 类别的: -Serial -Ethernet -SD -Wire Functions -available() -read() -flush() -find() -findUntil() -peek() -readBytes() -readBytesUntil() -readString() -readStringUntil() -parseInt() -parseFloat() -setTimeout() 语法参考主页面 本页由热血青年 LBU 译自英文版。 The text of the 86Duino reference is a modification of the Arduino reference, and […]


  • attachInterrupt()

    attachInterrupt()

    描述 发生中断时指定呼叫一个中断服务程式,替代任何之前带有中断的函式;86Duino 板拥有三个外部中断:No.0 (数位 pin 42) No.1 (数位 pin 43) No.2 (数位 pin 44),下面的表列出各 86Dino 版本可使用的中断 pin 脚。 对应 int.0~5 的 pin 脚列表: Board int.0 int.1 int.2 int.3 int.4 int.5 Zero 42 43 44 One 42 43 44 18 19 20 EduCake 42 43 44 18 19 20 PLC 0 2 5 6 对应 int.6~11 […]


  • bit()

    bit()

    描述 计算指定位元为 1 时所代表的数值 (例如:位元 0 的值是 1,位元 1 的值是 2,位元 2 的值是 4 …等)。 语法 bit(n) 参数 n: 欲计算的位元 回传 该位元所代表的数值 See also - bitRead() - bitWrite() - bitSet() - bitClear() 语法参考主页面 本页由热血青年 LBU 译自英文版。 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative […]


  • bitClear()

    bitClear()

    描述 将变数数值的某一个 bit 设定成 0。 语法 bitClear(x, n) 参数 x: 欲设定的变数值 n: 要设定为 0 的 bit 位置,最低有效位 (最右边) 为第 0 位元 回传 无回传值 See also - bit() - bitRead() - bitWrite() - bitSet() 语法参考主页面 本页由热血青年 LBU 译自英文版。 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a […]


  • bitSet()

    bitSet()

    描述 将变数数值的某一个 bit 设定成 1。 语法 bitSet(x, n) 参数 x: 欲设定的变数值 n: 要设定为 1 的 bit 位置,最低有效位 (最右边) 为第 0 位元 回传 无回传值 See also - bit() - bitRead() - bitWrite() - bitClear() 语法参考主页面 本页由热血青年 LBU 译自英文版。 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a […]