This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "mraa.hpp" | |
int main() | |
{ | |
// set GPIO digital pin "13" to be an output | |
mraa_gpio_context d_pin = mraa_gpio_init_raw(128); | |
mraa_gpio_dir(d_pin, MRAA_GPIO_OUT_HIGH); | |
// loop forever toggling the on board LED every second | |
for (;;) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function serve() { | |
local host=`hostname` | |
local port="${1:-8888}" | |
(sleep 1 && open "http://${host}:${port}/")& | |
python -m SimpleHTTPServer "$port" | |
} |
OlderNewer