• 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, 1 month ago

Make a Data Logger!


Part A.  Writing to the Serial Monitor


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 



Part B. Voltage Varying Sensors 



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?

It depends on the distance of the sensor, as far the object is from the sensor lower is the voltage, when it is closer the voltage is higher. 



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


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


  // initialize the serial communications:





void loop()



 int xvalue = analogRead(xpin);

  int yvalue = analogRead(ypin);

  int zvalue = analogRead(zpin);


   lcd.print("Nathalia ");



  // print the sensor values:


  // print a tab between values:



  // print a tab between values:




  // delay before next reading:

  delay(100); }



Part C. Count/Time-Based Sensors


a. Upload a picture of your rotary encoder in action!






Part D. Logging values to the EEPROM and reading them back



a. Turn in a copy of your final state diagram.



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?


3. Create your data logger!


a. Use the lab camera or your own camera/cell phone to record and upload a short demo video of your logger in action.







What happened to the second half of your lab report? :( -5 







Comments (1)

Vivien Tsao said

at 11:46 am on Aug 20, 2013

You have a few more hours to finish this should you want a better grade...

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