User Tools

Site Tools


uphp:functions:pin_set

Differences

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

Link to this comparison view

Next revision
Previous revision
uphp:functions:pin_set [2017/05/13 11:39]
admin created
uphp:functions:pin_set [2021/09/13 05:57] (current)
Line 1: Line 1:
-pin_set(int $pin_index, int $value) +======pin_set======
  
-Sets a digital output+<badge>WMPRO FW >= 1.0</badge> <badge>WMMEGA FW >= 2.0</badge>
  
-Refer to [[pin_configure()]] for the list of available pins.+Set a digital output to <html><b><span style="color:blue">value<span style="color:black"></b></html> 1 or 0
  
-If the pin is not configured as a digital output this does nothing.+====Description==== 
 + 
 +<well size="sm"><html> 
 +<span style="font-size:125%">pin_set ( 
 +<span style="color:green">int 
 +<span style="color:blue">$pin_index<span style="color:black">, 
 +<span style="color:green">int 
 +<span style="color:blue">$value 
 +<span style="color:black">
 +</html></well> 
 + 
 +====Parameters==== 
 + 
 +<html><b><span style="color:blue">$pin_index<span style="color:black"></b></html>:  The internal pin number.  Refer to [[pin_configure()]] for the list of available pins.  If the pin is not configured as a digital output this function does nothing. 
 + 
 +<html><b><span style="color:blue">$value<span style="color:black"></b></html>:  1 or 0 to set the digital output on or off 
 + 
 +====Return Values==== 
 + 
 +None 
 + 
 +====See Also==== 
 + 
 +[[pin_configure()]] - Configure an <tooltip title="Input/Output">I/O</tooltip> pin as a digital input, output, or analog input 
 + 
 +[[pin_get()]] - Return the value of an <tooltip title="Input/Output">I/O</tooltip> pin 
 + 
 +[[adc_read()]] - Read an onboard <tooltip title="Analog to Digital Converter">ADC</tooltip> channel
  
-$value can be 0 or 1 to switch off or on the digital output 
uphp/functions/pin_set.1494675565.txt.gz · Last modified: 2021/09/13 05:56 (external edit)