On 29. des. 2018, at 9:05 e.h., Pat Farrell <pat22...@gmail.com> wrote:
> I need a project to motivate myself into writing some non-trivial go. So I 
> want to learn about implementing control theory, sensors, etc. 
...
> So now I have 3 main questions:
> 1) is go a bad choice for implementing this?
> 3) what OS?  (Choices restricted to some flavor of Unix/Linux, or an RTos, no 
> OS-X, IOS, or Windows need apply)


Go's GC pauses and Linux's preemptions make them bad choices for this if 
occasional random failures are unacceptable, but in practice, for tinkering 
purposes, I think they're both fine --- my experience as a hobbyist is those 
worst-case hiccups happen far less often than other kinds of failure. Since 
part of your motivation is to make something nontrivial in Go, I'd say it's 
reasonable to use Go and if you have problems meeting some hard-real-time 
control constraint then re-implement just that loop on a dedicated 
microcontroller (bare metal or some simple RTOS).

> 2) what hardware should I use? RaspberryPI, or some super Arduino? or a more 
> specific microcontroller, perhaps controlled by a R-PI?

RasPIs are cheap and have a large community, but are a little weak at I/O. I'm 
a big fan of the Beaglebone, which is not quite at RasPI's level but is still 
pretty cheap and popular and has better I/O abilities. There are an enormous 
number of boards in the Pi/Beaglebone/etc class, though; I wouldn't spend too 
much time worrying about which one is the absolute best.

On the other hand, you *will* probably want to offload some stuff onto a 
Arduino-sized realtime processor at some point and then it doesn't matter as 
much what your "big" cpu is. You could do your initial steps 1 & 2 just using 
an Arduino as a relatively dumb I/O interface attached to your existing 
laptop/desktop (with the interesting algorithms running in Go on the host) and 
then you don't need to figure out Go cross-development until later. For 
example, this is what https://gobot.io/ does.

(By "Arduino" I really mean any of the little boards of that size, many of 
which can be programmed using the Arduino IDE if you wish. I like the Teensy 
boards from PJRC, but again, there are many many good options.)

There is a project ( https://tinygo.org/ ) to compile Go to small, OS-less 
devices like the larger Arduinos, but I have no experience with it. It might be 
a good fit for your projects though.


-- 
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