Gertboard

Tony Hardie-Bick EMAIL HIDDEN
Fri Jan 27 20:59:48 CET 2012


On 27/01/12 17:55, Peter Korsten wrote:
> Op 27-1-2012 17:50, Jay Vaughan schreef:
>
>>> Oh-kay... but what's that got to do with the code? Calling system() and
>>> forking your process just to send a '0' or '1' to a file means that C isn't
>>> your strongest point. I'm not complaining about his other, no doubt great,
>>> prowess; I'm complaining about his code.
>>
>> Where's the fork() .. and calling system() like that is fairly useful, you can
>> easily put more commands in the list if you need to, plus it makes it much
>> easier to debug if for some reason you need to strace. Thing is, there's
>> nothing wrong with this style of programming for embedded, Peter, you should
>> know that..
>
> The fork() is in the system(), unless things have changed drastically.

Anyone who knows about forking the shell will have already written their own 
code. These demos are designed to minimise the learning curve, and are aimed at 
people who have very little experience with electronics or programming.

The C program in the video clearly encapsulates commands that could be issued 
from any language, or from the command line. This is why it's written that way.

And there are days when the system call or its equivalent, have rendered dead 
hardware (even a satellite or two) as good as new.

In space nobody can hear you scream "that code just wasted 53 milliseconds of 
CPU time" - They just wanna get the pictures back to Sirius.

And that is why Gert is running this project.

Tony (HB)



More information about the music-bar mailing list