Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is Nano board really necessary inside robot? #6

Open
eimix opened this issue Jul 27, 2019 · 3 comments
Open

Is Nano board really necessary inside robot? #6

eimix opened this issue Jul 27, 2019 · 3 comments

Comments

@eimix
Copy link

eimix commented Jul 27, 2019

In library adcman/adcman.h is written:
"- WARNING: never use any 'analogRead()' in your code when using this class!"

This warning prevents using standard arduino functions, but it provides it's own functionality. Analog inputs could be read using this library:

Setup ADC pin: ADCMan.setCapture(pinMotorMowSense, 1, 1);
Program loop:
ADCMan.run();
if (ADCMan.isCaptureComplete(pinMotorMowSense)){
int value = ADCMan.read(pinMotorMowSense);
}

Is there any other limitation that makes Nano board necessary?

@lucabiasotto
Copy link

I asked myself the same question.
I removed the nano and directly used ADC to read volts and amps, it's works!!!

@comperta
Copy link

@lucabiasotto do not hesitate to share your modifications with us :-)

@lucabiasotto
Copy link

Hi @comperta, i connect the volt sensor to the A2 pin of the mega, then:

  1. On Setup_ADCMan method add the following command before ADCMan.run() :

ADCMan.setCapture(A2, 1, false);

  1. Comment the code where you read RawValueVolt from nano.

  2. finally you can use RawValueVolt = ADCMan.read(A2) for get the volt value.

I have a question for you, I don't understand what is the advantage of using ADCMan library. Do you think we could do everything with analogRead?
Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants