Data AcQuisition And Real-Time Analysis
Scope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
The following is from the Daqarta Help system:



Spectrum Analyzer

Signal Generator

(Absolutely FREE!)


Pitch Tracker


DaqMusiq Generator
(Free Music... Forever!)

Engine Simulator

LCR Meter

Remote Operation

DC Measurements

True RMS Voltmeter

Sound Level Meter

Frequency Counter
    Spectral Event

    MHz Frequencies

Data Logger

Waveform Averager


Post-Stimulus Time
Histogram (PSTH)

THD Meter

IMD Meter

Precision Phase Meter

Pulse Meter

Macro System

Multi-Trace Arrays

Trigger Controls


Spectral Peak Track

Spectrum Limit Testing

Direct-to-Disk Recording



Frequency response

Distortion measurement

Speech and music

Microphone calibration

Loudspeaker test

Auditory phenomena

Musical instrument tuning

Animal sound

Evoked potentials

Rotating machinery


Product test

Contact us about
your application!

Arduino_Meter Mini-App

This simple meter macro reads an analog input pin from an Arduino USB device and displays the reading directly in volts. Hitting any key exits the macro.

The K=5.0 / 1023 line assumes that the power supply is exactly 5.0 volts, but you can calibrate the unit for greater accuracy if you can measure the 5 V supply with a separate meter that you trust; just replace the 5.0 with that reading.

Optionally, you can set the Arduino analog reads to use a more-sensitive range of 1.1 volts full scale, by removing the semicolon from the start of this line:

;Port=$(hF0) + "b" + $(h03)   ;Uncomment for 1.1V range

If you do that, you should also uncomment the line near the end of the macro that restores the normal 5V range. (See Set ADC Bits and Voltage Range under DaqPort Arduino Sketch.)

Note, however, that calibrating the 1.1 V range is not so easy, since the Arduino doesn't have a handy terminal where you can read the actual 1.1 V value. Also, the more-sensitive range may pick up more noise.


Posn#0="Ardu"      ;Scan for Arduino
Posn#1=0           ;First match
@_ComDev_Scan      ;Scan COM devices for match

;Port=$(hF0) + "b" + $(h03)   ;Uncomment for 1.1V range

UP=hA0             ;Use Analog pin A0
K=5.0 / 1023       ;Factor, 0-1023 count to volts

WHILE.UK=0         ;Wait for any key to exit
    UK=Key?!           ;Get key, if any
    IF.UK=>0           ;Any key hit?
        LoopBreak=2        ;Exit WHILE if so
    Port#D1=UP         ;Request analog input
    UA=Port?2          ;analogRead input pin UP
    V=UA * K           ;Convert to volts
    Mtr0=V + " V"      ;Display volts
WEND.              ;Back for next pass
Mtr0=              ;Close meter
;Port=$(hF0) + "b" + $(h01)     ;Restore 5V range
Port#O=0           ;Close COM port

See also DaqPort Arduino Sketch, USB / Serial Communications Port Access, Macro Examples and Mini-Apps


Questions? Comments? Contact us!

We respond to ALL inquiries, typically within 24 hrs.
Over 35 Years of Innovative Instrumentation
© Copyright 2007 - 2023 by Interstellar Research
All rights reserved