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


Yarnes Nathan Lab 4

Page history last edited by zahraa@... 5 years, 1 month ago

Part A


          In the serial monitor I read values from 0 to 1023.



          Because the maximum value is 1023, the ADC has 10bits of resolution.


Part B


          I read values between ≈160 and ≈500. The change in voltage is ≈ 2V.



          This is the code i used to display the X, Y, and Z orientation of the accelerometer:



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)

#include <LiquidCrystal.h>

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

void setup()


  // initialize the serial communications:


  lcd.begin(16, 2);



void loop()


  // print the sensor values:


  // print a tab between values:



  // print a tab between values:




  // delay before next reading:

  lcd.setCursor(0, 0);


  lcd.setCursor(6, 0);


  lcd.setCursor(12, 0);





Part C



NO State diagram -.5

Part D




               Because the Arduino has 1KB of internal EEPROM the Atmega 32U4 can store 1,000 byte sized samples.


               For the information to b byte sized you divide the 10 bit analog values by 4 to equal 8 bits.

               1024/4= 256


No video -2


Comments (1)

xyyue@... said

at 2:34 pm on Aug 11, 2015

Well done.

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