User Tools

Site Tools


uphp:functions:pin_configure

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
uphp:functions:pin_configure [2017/05/19 14:35]
jeff
uphp:functions:pin_configure [2021/09/13 05:57] (current)
Line 3: Line 3:
 <badge>WMPRO FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge> <badge>WMPRO FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge>
  
-Configure an <tooltip title="Input/Output">IO</tooltip> pin as a digital input, output, or analog input+Configure an <tooltip title="Input/Output">I/O</tooltip> pin as a digital input, output, or analog input
  
 ====Description==== ====Description====
Line 19: Line 19:
 </html></well> </html></well>
  
-This function will change settings for certain pins on the WattmonPRO and MEGA.  This is actually not to be used unless you know what you are doing, because it may cause certain parts of the device to not function properly.+This function will change settings for certain pins on [[hardware:wattmons:WattmonPRO]] and [[hardware:wattmons:WattmonMEGA|MEGA]].  This is actually not to be used unless you know what you are doing, because it may cause certain parts of the device to not function properly.
  
 ====Parameters==== ====Parameters====
  
-<html><b><span style="color:blue">$pin_index<span style="color:black"></b></html>:  The internal pin number.  There are 16 configurable pins:+<html><b><span style="color:blue">$pin_index<span style="color:black"></b></html>:  The internal pin number.  These are the configurable pins:
 ^<html><b><span style="color:blue">Pin Index</html>^External Label (Physical)^Default^Settable as^Description^ ^<html><b><span style="color:blue">Pin Index</html>^External Label (Physical)^Default^Settable as^Description^
 |0 |VIN/A1 (PIN 2)      |ANALOG|ANALOG/INPUT/OUTPUT|Voltage of primary input                                                      | |0 |VIN/A1 (PIN 2)      |ANALOG|ANALOG/INPUT/OUTPUT|Voltage of primary input                                                      |
Line 43: Line 43:
  
 ^<html><b><span style="color:blue">Pin Type</html>^Description^ ^<html><b><span style="color:blue">Pin Type</html>^Description^
-|1 |OUTPUT (digital)        +|1 |Digital Output
-|2 |INPUT (digital)         +|2 |Digital Input
-|4 |ANALOG input            +|4 |Analog Input
-|16|COUNTER (digital input) |+|16|Counter|
  
 <html><b><span style="color:blue">$counter_type<span style="color:black"></b></html>:  Optional if configuring a COUNTER (pin index 6-9), choose from the following: <html><b><span style="color:blue">$counter_type<span style="color:black"></b></html>:  Optional if configuring a COUNTER (pin index 6-9), choose from the following:
Line 61: Line 61:
 ====See Also==== ====See Also====
  
-[[pin_get()]] - Return the value of a digital input pin+[[pin_get()]] - Return the value of an <tooltip title="Input/Output">I/O</tooltip> pin
  
-[[pin_set()]] - Set a digital output to value (1 or 0)+[[pin_set()]] - Set a digital output to value 1 or 0
  
 [[adc_read()]] - Read an onboard <tooltip title="Analog to Digital Converter">ADC</tooltip> channel [[adc_read()]] - Read an onboard <tooltip title="Analog to Digital Converter">ADC</tooltip> channel
  
uphp/functions/pin_configure.1495204506.txt.gz · Last modified: 2021/09/13 05:56 (external edit)