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



Page history last edited by Vivien Tsao 7 years ago

a. Based on the readings from the serial monitor, what is the range of the analog values being read?




b. How many bits of resolution does the analog to digital converter (ADC) on the Atmega32U4 have (hint: where might you look to find this sort of thing)? How many are you using with the range of values you're seeing?


10 bits (2^10 = 1024)


a. Describe the voltage change over the sensing range of the sensor. A sketch of voltage vs. distance would work also. Does it match up with what you expect from the datasheet?


When an object was far away the voltage would drop down to almost 0 but as i brought the object or sensor closer it increased the voltage to about 3V


a. Include your accelerometer read-out code in your write-up.


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()


  // initialize the serial communications:




void loop()


  // print the sensor values:


  // print a tab between values:



  // print a tab between values:




  // delay before next reading:




a. How many byte-sized data samples can you store on the Atmega32U4?




b. How would you get your analog data from the ADC to be byte-sized?


ADC is a 10 bit sample 

✓ What does this mean? -0.5










Comments (1)

Vivien Tsao said

at 5:02 pm on Aug 10, 2013

Good job! :)

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