Giter Site home page Giter Site logo

new01 / streamlog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from abhijeetbyte/streamlog

0.0 0.0 0.0 88 KB

The library's functionality is to format and log sensor data coming from Arduino in a streamlined manner as CSV.

License: MIT License

C++ 100.00%

streamlog's Introduction

StreamLog

The idea of streamlining your data logging process.


Releases GitHub Tag License GitHub top language arduino-library-badge

Library functionality is to format and log sensor data, coming from your microcontroller in a streamlined manner.

Need ? ๐Ÿ™„

The StreamLog library simplifies the process of logging and formatting data from your Arduino sketch, allowing you to focus on your core logic without worrying about the intricacies of data formatting. With just one function call, you can log multiple data variables along with their corresponding names, and the library takes care of CSV formatting of your data, adding timestamps, and visualizing it directly on the Arduino serial console.

This streamlined approach eliminates the need for writing additional lines of code in your sketch for data logging purposes, saving your time and effort.
You can easily use the logged data with any additional application for further analysis, visualization, or integration with other systems as it formats the raw Arduino data into a comma-separated file (CSV). Whether you're prototyping a project or developing a complex application where you want to monitor changes in data patterns over an extended period of time, StreamLog simplifies the process and enhances the efficiency of data logging and formatting within one platform without using any additional or third-party application.

Features ๐ŸŒŸ

  • No, need to write extra codes for data formatting and printing on the serial monitor.
  • Standard data output as comma-separated file (CSV).
  • Support custom time intervals for data output ( second, minutes, hours etc..)
  • Use any software to see your data ( Arduino serial monitor, PuTTY etc. ) as long it supports serial communication.
  • Available as plug-and-play, just import/include the library in your sketch.

Download ๐Ÿ‘‡


  • You can download the latest release of this library as zip : download and import it using the library manager.
  • Available on Arduino IDE library manager

    image


Working โš™๏ธ

  • Import the StreamLog library in your Arduino sketch.

  • Call the functions of this library in your sketch, and put your data variables as arguments along with their names.

ex:

void setup (){

StreamLog.begin(9600); // intilize and define baud rate
}

void loop(){

  StreamLog.head("LDR1, LDR2, LDR3, etc....");
  StreamLog.data(5000, 3, LDR1intensity, LDR2intensity, LDR3ntensity, etc...);

}

Here,

  • StreamLog.head function is for sensor data headings/names of columns, this could be as many as you want.
  • In StreamLog.data
    • 5000: Time interval between data logs in milliseconds (5 seconds)
    • 3: Total number of variables ( sensor readings), including the delay and other values. This could be as many as you want.

Upload the sketch and turn on the serial monitor.



Output ๐Ÿš€

Output on the Arduino Serial monitor as CSV format, of an LDR connected as analog input.
You can also enable the timestamp feature of the Serial monitor, otherwise timestamp column will be zero.

Timestamp (HH:MM:SS.MMM), Light Intensity,  Elapsed time ( S )
16.53.45.687, 100, 0 
16.58.00.011, 75, 300
17.03.00.094, 46, 600
17.08.00.014,  17,900

This is data reading of sunset, the experiment was started just before sunset, and set to log data in an interval of every 5 minutes in StreamLog.data(300000, ..... );



Post Processing ๐Ÿ‘ทโ€โ™‚๏ธ

  • Now after completing the experiment, click on Serial monitor windows and copy everything.
  • Open any text editor, here I am opening Notepad, and past it there, Click on "Save As.." or click Ctrl+Shift+S.
  • Save it as .CSV

image

  • Change "Text Documents (.txt)" to "All Files"
  • You are done, the file was already in CSV format, just open it in MS Excel or anywhere else. Open it to see the changes in data over elapsed time or visualize the trend line

image



Reporting Issues & Contributions

Feel free to report issues and contribute to this repository

License

Copyright ยฉ 2024 Abhijeet kumar. All rights reserved.

Licensed under the MIT License.

streamlog's People

Contributors

abhijeetbyte 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.