Last active
January 13, 2019 23:35
-
-
Save ypelletier/bf3d5a793502b68f564b to your computer and use it in GitHub Desktop.
Utilisation de la macro OpenDaqCalc pour acheminer à LibreOffice Calc les mesures prises par l'Arduino.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*************************************************************************************** | |
Utilisation de la macro OpenDaqCalc pour acheminer à LibreOffice Calc les mesures prises | |
par l'Arduino. | |
http://electroniqueamateur.blogspot.com/2014/10/transmettre-les-donnees-darduino-vers.html | |
****************************************************************************************/ | |
int Mesure_Pin = A0; // nous allons envoyer l'état de l'entrée analogique A0 | |
void setup() { | |
Serial.begin(9600); // initialisation de la communication série à 9600 bps | |
Serial.println("CLEARDATA"); // on efface les données déjà présentes, s'il y a lieu | |
} | |
void loop() { | |
int ValeurMesuree = analogRead(Mesure_Pin); // lecture de la pin A0 | |
Serial.print("DATA,"); // envoi du temps et la mesure à LibreOfficeCalc | |
Serial.print(millis()); | |
Serial.print(","); | |
Serial.println(ValeurMesuree); | |
delay(1000); // 1 seconde d'attente entre chaque mesure | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment