6 ms·
Using C to call the shell to write a character to a file to drive a motor. Amazing.
by EdiX 15y ago
Using C to call the shell to write a character to a file to drive a motor. Amazing.
- nitrogen 15y agoWhy? Why??? The overhead of spawning the shell is going to be significant versus simply opening /sys/class/gpio/... directly. The PIC attached via SPI sounds cool, though. It'd be cool if they supported USB-capable PICs and brought the USB pins out to a mini-B header in the final or second version of the Gertboard.
- deleted 15y ago[deleted]
- blhack 15y ago>Why? Why??? The person who wrote this probably didn't know of a different way of doing it.
- rcxdude 15y agohe knew better, but it's to 'demonstrate ease of use' : http://www.raspberrypi.org/archives/500#comment-7659 http://www.raspberrypi.org/archives/500#comment-7659
- rcxdude 15y agoaccording to the writer, it's to demonstrate the ease of use of the driver: http://www.raspberrypi.org/archives/500#comment-7659 http://www.raspberrypi.org/archives/500#comment-7659 still doesn't seem like a good example to set though.
- rmoriz 15y agothey guys over from BeagleBoard.org (TI) currently build a node.js based framework for scripting (including "cape" support, their name of expansion boards) https://github.com/jadonk/bonescript/blob/master/bonescript/index.js#L187 https://github.com/jadonk/bonescript/blob/master/bonescript/...