Lighter method to read Analog values on IND I/O

I find that just adding the Indio library and using these 3 lines (which is the minimum to read an analog values) uses up nearly 15%-18% of the 32 KB memory.

Indio.setADCResolution(16);

Indio.analogReadMode(1, V10);

sensorVal1=Indio.analogRead(1);

Is there some lighter method which I can use to read Analog values. It is acceptable to just read the 16bit of the ADC. All I have is about 10% of the 32 KB to spare.

Raghuram Shenoy
Raghuram Shenoy
7
| 0 0 0
Asked on 3/2/16, 12:45 PM
0
vote
793 Views

Stephano - Thanks a lot for your assistance.

I guess I took the lazy option of upgrading to the 1286 version of the IND I/O which gives me 128 KB of memory.

Raghuram Shenoy
Raghuram Shenoy
7
| 0 0 0
Answered on 4/13/16, 8:35 AM
0
vote

The analog input of Industruino is made by a chip connected to the MCU via I2C.

The name of the chip is 3242.

You can of course address the chip directly if you are able to, reading and writing the right I2C registers.

You can get hints from the Indio.cpp file contained in the Indio library.

But as I2C is built on the Wire library, I don't know how much program memory you will spare.

If you are just trying to read a simple voltage between 0V and 5V, you could use the analog pins on the IDC connector.

These don't need the Indio library.

Stefano Giuseppe Bonvini
Stefano Giuseppe Bonvini
567
| 0 0 0
Answered on 4/11/16, 2:45 PM
0
vote

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!

Ask a Question

Keep Informed

About This Forum

This community is for professionals and enthusiasts of our products and services.

Read Guidelines

Question tools

21 follower(s)

Stats

Asked: 3/2/16, 12:45 PM
Seen: 793 times
Last updated: 4/13/16, 8:35 AM