break
5 years ago
4 changed files with 28 additions and 0 deletions
@ -0,0 +1,28 @@ |
|||||
|
//Καθορισμός μεταβλητών
|
||||
|
const int xpin = A0; |
||||
|
const int ypin = A1; |
||||
|
const int zpin = A2; |
||||
|
|
||||
|
//Ρυθμός ροής δεδομένων
|
||||
|
void setup() |
||||
|
{ |
||||
|
Serial.begin(9600); |
||||
|
} |
||||
|
|
||||
|
//Βρόγχος ανάγνωσης και εκτύπωσης των τιμών από το επιταχυνσιόμετρο
|
||||
|
void loop() |
||||
|
{ |
||||
|
int x = analogRead(xpin); |
||||
|
delay(50); |
||||
|
int y = analogRead(ypin); |
||||
|
delay(50); |
||||
|
int z=analogRead(zpin); |
||||
|
|
||||
|
Serial.print(x); |
||||
|
Serial.print("\t"); |
||||
|
Serial.print(y); |
||||
|
Serial.print("\t"); |
||||
|
Serial.print(z); |
||||
|
Serial.print("\n"); |
||||
|
|
||||
|
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue