"read failed" error - Analog Input. How to connect potentiometer to Analog input of Industruino 1286 Ind.I/O ?
I have a simple potentiometer with 3 pins (V+, Signal, GND). I have connected first pin (V+) to +5V of external power supply, second pin (Signal) to Analog Input (CH1) and third pin (GND) to ground of external power supply and ground pin (Analog zone) of Industruino. Industruino is powered by USB cable connected to Laptop. Serial Monitor shows "read failed" as soon as Industruino is powered up and there is no change in the potentiometer values. I have changed analogReadMode to V10 or mA_raw, and the error still exists.
This wiring works with Arduino Uno with simple analogRead function. However it doesn't work with Industruino.
#include <Indio.h>
#include <Wire.h>
float sensorVal1;
void setup()
{
Serial.begin(9600);
Indio.setADCResolution(16);
Indio.analogReadMode(1, mA);
}
void loop()
{
sensorVal1 = Indio.analogRead(1);
Serial.println(sensorVal1);
}
Try powering the Industruino with a 24V power supply connected to the V+ and GND on the lower ports. This seems to be required to power the digital and analog zones of the board.
Your answer
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
Keep Informed
About This Forum
This community is for professionals and enthusiasts of our products and services.
Read GuidelinesQuestion tools
Stats
Asked: 12/22/15, 12:30 PM |
Seen: 6140 times |
Last updated: 1/3/16, 4:16 AM |