It's easy to use Go on the Raspberry Pi (with or without 
cross-compilation), and AFAIK you can gain low-level access to the hardware 
in almost the same way than in C.

For example, you can use all the features of the GPIO by mmap-ing the 
registers dedicated to its control (under linux the corresponding memory 
block is available through /dev/gpmem). In code, this would look like this 
<https://github.com/cozely/raspberry/blob/master/gpio/gpio.go>. Note that 
since Go does not have a "volatile" keyword, this relies on the compiler 
not doing disruptive optimizations, such as changing the order of 
assignments; but there may be other ways to ensure this.

So I think Go is a good fit for the projects you describe; the Pi is 
probably overkill for the first two, but perfect for the others.

As for the OS, I've only used linux (raspbian lite) so far, but intend to 
switch to gokrazy <https://gokrazy.org/> later. It's still the linux 
kernel, but with a pure-go (minimalist) userland. I don't think the go 
compiler supports any RTos?

Have fun!

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to