Coder Social home page Coder Social logo

wyrover / etfarduino Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mlalic/etfarduino

0.0 1.0 0.0 126 KB

A project which allows the use of an Arduino device for data acquisition within the MATLAB Data Acquisition Toolbox.

License: MIT License

C++ 95.43% C 0.41% Objective-C 2.65% Arduino 1.51%

etfarduino's Introduction

etfarduino

A project which allows the use of an Arduino device for data acquisition within the MATLAB Data Acquisition Toolbox.

It was developed as a part of my Bachelor's thesis which I completed at the Faculty of Electrical Engineering Sarajevo (www.etf.unsa.ba/)

The project is published under the MIT license.

Download

A zip bundle containing the compiled x86 binaries and Arduino source can be downloaded from this link.

Components

The project contains four components which work together to achieve the goal of using Arduino for data acquisition from within MATLAB.

  1. EtfArduinoFirmware -- an Arduino sketch which allows it to respond to commands from the computer;
  2. EtfArduinoService -- a service process which allows its client processes to access Arduino's data acquisition functionality. This way, it is possible to develop other applications relying on this functionality;
  3. etfarduino.dll -- a DLL which implements the adaptor COM interface for MATLAB's Data Acquisition Toolbox;
  4. EtfArduinoConfig -- a GUI application for configuring connected Arduino devices for data acquisition.

Compilation

The project was developed using Microsoft Visual Studio 2008 IDE and the MS VC++08 compiler for the PC components.

The Arduino IDE and avr-gcc compiler were used for the Arduino firmware application.

Usage

To use this software follow these steps:

  • Compile and upload the Arduino sketch (EtfArduinoFirmware) using the Arduino IDE;
  • Start the EtfArduinoService.exe application;
  • Run MATLAB in an elevated privilege mode (Run as Administrator) and register the adaptor in the MATLAB environment by running the command daqregister 'path/to/etfarduino.dll';
  • Restart MATLAB with standard user privileges;
  • Run the EtfArduinoConfig application and register the connected Arduino as an acquisition device by clicking the button.

It is now possible to use the connected Arduino device as any other acquisition device, such as MCC or National Instruments devices.

For example:

ai = analoginput('etfarduino', 0);
addchannel(ai, 0);
start(ai);
wait(ai, 2);
[data, t] = getdata(ai, ai.SamplesAcquired);
plot(t, data)

Notes

Currently, two analog input channels (on pins A0 and A1) and one analog output channel (on the digital pin 3) are supported. Analog input and output can work in parallel.

Using the EtfArduinoConfig it is possible to register multiple Arduino boards which are able to perform acquisition tasks in parallel.

etfarduino's People

Contributors

mlalic avatar

Watchers

wyrover avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.