Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

First off, I like the idea of being able to write micro-controller code in Perl, or as is more likely, having my Perl code converted to the subset of C(++) that is then compiled and uploaded to whatever micro-controller I happen to be using.

That said, and with the Yun being a retired product (and not so many affordable alternatives that I have found on the market), it may be a hard sell to get the time and effort put into something like this.

I 'mess around' with various micro-controllers, mostly the Uno, Feather, Trinket Pro, and the radio (RFM) capable modules. From a cost perspective as well as a 'division of functionality' perspective, I have found that an RPi connected to a micro-controller via USB does a fine job.

The RPi does the processing of incoming data, both receiving the data(Serial), processing it(using whatever I need from CPANm or whatever), and displaying it (apache2). This leaves all the more 'bloated' work to the RPi. The micro-processor just does what it is good at: and that is handle IO through the digital and analog ports, basic data manipulation(mostly math conversions like tempC to tempF or analog value to other measurement unit) along with some data organization such as formatting the output to JSON for transfer to the RPi.

For the money, it seems the most reliable approach right now. I have at times added the web-server to an Uno or Mega which works fine, but find that the overhead is really not worth the effort. It cuts down on the real power of the micro-controller, which is in my mind its ability to gather a lot of data very fast.

I really would like the ability to write Perl and have good controller code end up on the micro-controller. That would be a great advantage to me as I am no C(++) programmer. That tied in with the fact that the documentation of the libraries for some of the C code that has been written for the micro's just plain sucks, makes the idea of Perl for MC's really attractive.

I am no C programmer, don't really understand compilers in any meaningful way either. So my 'picture' of this is something like

  • 'Perl->C->existing C compiler->micro-controller'.
though the Arduino IDE. Not sure if that is what is being talked about here(sorry for my lack of in depth knowledge) but that seems to me like the most affordable approach based on the hardware available, the cost of that hardware, and the effort it would take to make Perl really usable as a language for micro's

I should probably clarify here that I have avoided using the RPi as a micro-controller, though I know that is often done via GPIO etc... . This is again, because of my bias of 'division of function', where I think of the RPi as a nice Linux box and the micro as a pure data-acquisition and device/sensor controller.

<Hope this is not too far off-topic...

...the majority is always wrong, and always the last to know about it...

A solution is nothing more than a clearly stated problem...


In reply to Re: What do we have to do to resuscitate micro Perl? I want Circuit Perl NOW! by wjw
in thread What do we have to do to resuscitate micro Perl? I want Circuit Perl NOW! by ait

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-26 09:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found