platform for control and data acquisistion application development

Using MicroDAQ with Python

Thanks to its flexibility, Python is one of the most popular programming languages. The Microdaq allows use MicroDAQ device in Python applications. All major features like data acquisition and DSP management functions are available now for Python users. 


The Microdaq library is a Python programming interface for programming analog input, analog output, digital I/O, on MicroDAQ DAQ devices. The library can be used on Windows and Linux operating systems. The user can use Microdaq library to create data acquisition applications and control applications with real-time processing on MicroDAQ DSP core. Microdaq provides DSP management functions allowing the user to embed real-time processing on dedicated hardware in standard Python application. 

Microdaq (1.4.0) function reference

Digital I/O

  • dio_read - Reads DIO state
  • dio_write - Writes DIO state
  • dio_dir - Sets MicroDAQ DIO bank direction
  • dio_func - Sets DIO alternative function
  • led_write - Sets MicroDAQ D1 and D2 LED state
  • func_key_read - Reads MicroDAQ function key state
  • pwm_init - Setups MicroDAQ PWM outputs
  • pwm_write - Sets MicroDAQ PWM outputs
  • enc_init - Initializes encoder module
  • enc_read - Reads encoder position and motion

Analog I/O

  • ai_read - Reads MicroDAQ analog inputs
  • ai_scan_init - Inits AI scan
  • ai_scan - Starts scanning and reads scan data
  • ao_write - Writes data to MicroDAQ analog outputs

DSP managment

  • dsp_run - Executes DSP program
  • dsp_signal_read - Receives data from DSP
  • dsp_mem_write - Writes data to MicroDAQ memory
  • dsp_stop - Stops DSP program


  • connect - Connects to MicroDAQ device  
  • reconnect - Connects to MicroDAQ device  
  • disconnect - Disconnects from MicroDAQ device
  • get_lib_version - Returns version of MLink library
  • get_fw_version - Returns version of MicroDAQ firmware
  • hw_info - Returns model of connected MicroDAQ device
More information you can find in __doc__ section of these methods.
To install microdaq package:

>> pip install microdaq

To upgrade:

>> pip install microdaq --upgrade
Example code

This example show how to use MicroDAQ library to read analog input with 100ksps rate:

import microdaq

mdaq = microdaq.Device("")
    ai_range=[-10, 10], 

data = mdaq.ai_scan(

For more examples visit Microdaq repository on GitHub.