Hi Guys
I'm trying to receive analog data from arduino...
I'm using Firmata and Windows Apps with Remote Arduino.
For some reason I can't read analog values: I can read and write digital pins but I cant read the analog ones (not tried yet to write).
The funny thing is that using "Windows Remote Arduino Experience" app I can read those analog values correctly, so my problem is not the wiring, the sendor neither the firmata sketch. The problem must lie on my vb code.
So here's a piece of VB code how I'm trying to read values:
Dim _Connection As New UsbSerial("VID_1A86", "PID_7523" )
Dim _RemoteDevice As New RemoteDevice(_Connection)
_Connection.begin(57600, SerialConfig.SERIAL_8N1)
'reading digital values
Dim vDPinState = _RemoteDevice.digitalRead(0)
'reading analog values
_RemoteDevice.pinMode("0", PinMode.INPUT)
Dim vAPinValue = _RemoteDevice.analogRead("0")
The value vAPinValue is always 65535 and if I try to use get the pin mode (after assign to input)
Dim v = _RemoteDevice.getPinMode("0")
I get that the pin mode is IGNORED...
So there's something wrong with my code.
Can anyone help me here?
Thanks