Note that there are some explanatory texts on larger screens.

plurals
  1. PONode.js script not setting BeagleBone Black mux
    primarykey
    data
    text
    <p>On my BeagleBone Black, when I run this script:</p> <pre><code>#!/usr/bin/node var b = require('bonescript'); b.getPlatform(printData); function printData(x) { console.log('name = ' + x.name); console.log('version = ' + x.version); console.log('serialNumber = ' + x.serialNumber); console.log('bonescript = ' + x.bonescript); console.log(); } b.pinMode("P9_11", b.OUTPUT, 7, 'pullup', 'slow'); b.pinMode("P9_13", b.OUTPUT, 7, 'pullup', 'slow'); b.pinMode("P9_15", b.OUTPUT, 7, 'pullup', 'slow'); b.pinMode("P9_17", b.OUTPUT, 7, 'pullup', 'slow'); b.getPinMode("P9_11", printPinMux); b.getPinMode("P9_13", printPinMux); b.getPinMode("P9_15", printPinMux); b.getPinMode("P9_17", printPinMux); function printPinMux(x) { console.log('mux = ' + x.mux); console.log('pullup = ' + x.pullup); console.log('slew = ' + x.slew); if(x.options) { console.log('options = ' + x.options.join(',')); } console.log('pin = ' + x.pin); console.log('name = ' + x.name); console.log('err = ' + x.err); console.log(); } </code></pre> <p>I get this output:</p> <pre><code>name = BeagleBone Black version = 0A5A serialNumber = 1813BBBK7710 bonescript = 0.2 mux = 7 pullup = pullup slew = fast options = gpmc_wait0,mii2_crs,NA,rmii2_crs_dv,mmc1_sdcd,NA,NA,gpio0_30 pin = P9_11 name = UART4_RXD err = undefined mux = 7 pullup = pullup slew = fast options = gpmc_wpn,mii2_rxerr,NA,rmii2_rxerr,mmc2_sdcd,NA,NA,gpio0_31 pin = P9_13 name = UART4_TXD err = undefined mux = 2 pullup = pulldown slew = slow options = spi0_cs0,mmc2_sdwp,i2c1_scl,NA,NA,NA,NA,gpio0_5 pin = P9_17 name = I2C1_SCL err = undefined mux = 0 pullup = pulldown slew = fast options = mii1_rxd3,NA,rgmii1_rd3,mmc0_dat5,mmc1_dat2,NA,mcasp0_axr0,gpio2_18 pin = P9_15 name = GPIO1_16 err = undefined </code></pre> <p>It looks like b.pinMode() isn't setting the pins' modes. Why?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload