Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Perl interface to analog inputs on the Raspberry Pi

by stevieb (Canon)
on Jan 11, 2017 at 16:16 UTC ( [id://1179406]=CUFP: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use warnings;
    use strict;
    ...
    my $v = $adc->volts;
    my $p = $adc->percent;
    my $r = $adc->raw;
    
  2. or download this
    # A0, A1 and A3 input channels
    
    for (0, 1, 3){ 
        print $adc->percent($_) ."\n";
    }
    
  3. or download this
    my $diff_a0_a3 = $adc->percent(5);
    
    ...
    
    $adc->channel(5);
    my $diff_a0_a3 = $adc->percent;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: CUFP [id://1179406]
Approved by haukex
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-03-28 10:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found