EcoModder.com

EcoModder.com (https://ecomodder.com/forum/)
-   OpenGauge / MPGuino FE computer (https://ecomodder.com/forum/opengauge-mpguino-fe-computer.html)
-   -   Help with simple code for reading VSS (https://ecomodder.com/forum/showthread.php/help-simple-code-reading-vss-36682.html)

Ecky 08-03-2018 10:45 AM

Help with simple code for reading VSS
 
Hi all, I'm working on a project where (with an Arduino Uno) I need to read VSS and, depending on its value, output one thing or another. It's been a decade since I've done any significant coding.

I looked over the MPGuino schematics and noted that the VSS signal wire has a 50k ohm resistor and then feeds into the analog 0 pin. I've been trying to figuring out how to pick out the code used in the MPGuino project which is used to read and store this, without success. Can someone explain to me in brief how the Arduino records this? Does the MPGuino code count the frequency of ground pulses?

What does the logic and the code, look like to store this value so it can be queried?

teoman 08-03-2018 05:21 PM

Tvago would be the man to ask I think about mpguino specifics.

teoman 08-03-2018 05:25 PM

But for starters there is a sample project, analog read serial. Use tht, delete the unnecessary text and the use serial plotter on the arduino ide to see what signal you are getting.

If it is just pulses the i would probably use an interrupt instead of the analog input.

Ardent 08-03-2018 09:40 PM

Haven't used it , but FreqMeasure may help: https://www.pjrc.com/teensy/td_libs_FreqMeasure.html

Direct usage of the timers as used by the MPGuino isn't exactly simple.

Some info/keywords to aid your searching here: Advanced Arduino: direct use of ATmega counter/timers

teoman 08-05-2018 04:55 AM

Were you able to have a look at the signal?

Ecky 08-05-2018 07:25 AM

Not yet, I have several projects going on at once.


All times are GMT -4. The time now is 01:40 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com