Created
September 29, 2016 10:38
-
-
Save marcotchella/609c3c089d628a4c0de8c7c028ce7501 to your computer and use it in GitHub Desktop.
sketch arduino para leitura eixos do acelerometro mma7361
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
/* | |
Autor: Marco T. Chella | |
Em: 28/09/2016 | |
Para saber mais: | |
*/ | |
void setup() { | |
// initialize serial communication at 9600 bits per second: | |
Serial.begin(9600); | |
} | |
// the loop routine runs over and over again forever: | |
void loop() { | |
// read the input on analog pin 0: | |
String vx = String (analogRead(A0)); | |
String vy = String (analogRead(A1)); | |
String vz = String (analogRead(A2)); | |
Serial.println(vx + "," + vy + "," + vz); | |
delay(10); // delay in between reads for stability | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment