Just dorking around for a few minutes to take a break from other things . .
.

var base_path = "/sys/class/gpio/gpio";
var pin_number = "49";
var value = base_path + pin_number + "/value"
var direction = base_path + pin_number + "/direction"

read(value);
read(direction);
write(direction, 'high');
read(value);
read(direction);

function read(path){
    var fs = require('fs');

    var buf = fs.readFileSync(path, 'utf8');
    console.log(path + ': ' + buf);
}

function write(path, value){
    var fs = require('fs');
    fs.writeFileSync(path, value, 'utf8');
}

*Output*

william@beaglebone:~/dev$ echo 49 > /sys/class/gpio/unexport
william@beaglebone:~/dev$ echo 49 > /sys/class/gpio/export
william@beaglebone:~/dev$ node node-gpio.js
/sys/class/gpio/gpio49/value: 0

/sys/class/gpio/gpio49/direction: in

/sys/class/gpio/gpio49/value: 1

/sys/class/gpio/gpio49/direction: out


On Tue, May 17, 2016 at 12:09 AM, Baozhu Zuo <[email protected]> wrote:

> Thanks Jason, We are happy to work with you.
>
> 在 2016年5月17日星期二 UTC+8下午12:39:01,Jason Kridner写道:
>>
>>
>> On Sat, May 14, 2016 at 8:34 AM Jason Kridner <[email protected]>
>> wrote:
>>
>>> Robert's made a ton of improvements over the last several weeks/months
>>> and it makes some sense to try to update the promoted images. A GUI-less
>>> IoT image is now being produced to
>>>
>>> These are using a 4.4 Linux kernel.
>>>
>>
>> So far, feedback has been that these images are an improvement, but have
>> some issues to be resolved. To that end, I've mirrored them and added them
>> to
>>
>> http://beagleboard.org/latest-images
>>
>> After Maker Faire Bay Area, we can put a concerted effort into cleaning
>> up the remaining bugs.
>>
>>
>>>
>>> LXQT-4GB for BeagleBoard-X15:
>>>
>>> http://debian.beagleboard.org/images/bbx15-debian-8.4-lxqt-4gb-armhf-2016-05-13-4gb.img.xz
>>>
>>>
>>> shat256sum: 69dc6b1daccc5fc0bb3050977d102706621ec0dd8bf14757f5ef0542e60ac72e
>>>
>>> LXQT-4GB for BeagleBone Black and compatibles:
>>>
>>> http://debian.beagleboard.org/images/bone-debian-8.4-lxqt-4gb-armhf-2016-05-13-4gb.img.xz
>>>
>>>
>>> sha256sum: 28d67e877497fb9e52fe605f2cbefdbaedaff23e9fa82e9ed2076ae375aa777f
>>>
>>> IoT for BeagleBone Black and compatibles:
>>>
>>> http://debian.beagleboard.org/images/bone-debian-8.4-iot-armhf-2016-05-13-4gb.img.xz
>>>
>>>
>>> sha256sum: 22fbba21cf294a92528b8a973e838f3cac801ce0e7d180b260a583f4bb0d1318
>>>
>>> There are associated bmap files in the directory for those using
>>> bmaptool. For others, I recommend using http://etcher.io.
>>>
>>> Reply with issues here or post to
>>> http://github.com/beagleboard/image-builder.
>>>
>>>
>>> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to the Google Groups
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/2e914225-06e5-47b5-954e-959863087f72%40googlegroups.com
> <https://groups.google.com/d/msgid/beagleboard/2e914225-06e5-47b5-954e-959863087f72%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALHSORoxwyMER8ViHxG01RkhYpTSP1XW59869N8aRpO7Y6uX%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to