• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions. Connect your Gmail, DriveDropbox, and Slack accounts and in less than 2 minutes, Dokkio will automatically organize all your file attachments. Learn more and claim your free account.


Koe Josephine Lab 4 Code

Page history last edited by Josephine 5 years, 2 months ago

#include <LiquidCrystal.h>


LiquidCrystal lcd(12, 11, 5, 4, 3, 2);


// these constants describe the pins. They won't change:

const int xpin = A3;                  // x-axis of the accelerometer

const int ypin = A2;                  // y-axis

const int zpin = A1;                  // z-axis (only on 3-axis models)


void setup()


  lcd.begin(16, 2); 



void loop()


  // print the sensor values:



  // print a tab between values:

  lcd.print("  Y");


  // print a tab between values:

  lcd.print("  Z");


  // delay before next reading:





Comments (0)

You don't have permission to comment on this page.