Hacker News new | ask | show | jobs
by mcconnma 3882 days ago
It is a little more than that as you also need to write alternating state to the file, but you are right, and that is the point of the post. You can read/write embedded sensors/actuators in whatever language you are comfortable by simply reading/writing from the Linux file system.
2 comments

.. on a correctly set up beaglebone, not other systems. It would be much better if this were in the title.

On most embedded systems and FPGAs faffing with the toolchain and hunting in the documentation is 99% of the effort of getting an LED blinking, that's why it's used as the embedded 'hello world'.

good point, I updated the front matter of the post to make this more explicit.
...if your Linux base port has the chip-specific GPIO driver wired up correctly and is enabled in the kernel along with the sysfs interface.