Thanks ! It works with File.writestring:
public Sub WritePin(pin_name As String, pin_on As Boolean)
If pin_on Then
File.WriteString("/sys/class/gpio_sw/" & pin_name & "/","data","1")
Else
File.WriteString("/sys/class/gpio_sw/" & pin_name & "/","data","0")
End If
End Sub
To define the function of the pin (input or output) I use
Public Sub DefinePin(pin_name As String, Write As Boolean)
If Write Then
File.WriteString("/sys/class/gpio_sw/" & pin_name & "/","cfg","1")
Else
File.WriteString("/sys/class/gpio_sw/" & pin_name & "/","cfg","0")
End If
End Sub
(not tested yet...)
How should I work with this command, for reading the data from a pin ?
cat /sys/class/gpio_sw/PA1/data
Edit: I have found that cat provides data, I'll test and find the type of it, but anyway there are more required definitions (pwm, digital or analog read etc), we do need a librry here,
Can someone find the code of wiringpi library ? it might help to find the definitions.