week 2

This week I started developing circuits with the microcontroller using Arduino IDE. I also learned how to solder, which was new and exciting. Overall the labs went smoothly with a few hick-ups like figuring out that:

    1. I need to use ~D ports for analogWrite().
    2. I need to introduce delay() after the tone() to make sure the sound plays since the loop() goes too fast relative to the frequency.

Some questions following the lab remain:

      • When combining an LED with a resistor in series does it matter if the resistor goes before the LED or after?
      • Why choose the same order of magnitude resistor as the variable resistor?
      • What does ‘9600’ in Series.begin() mean?
      • What does the following mean: When you take a reading with the ADC using the analogRead() command, the microcontroller stores the result in memory. It takes an int  type variable to store this, because a byte  is not big enough to store the 10 bits of an ADC reading. A byte can hold only 8 bits, or a range from 0 to 255′

A few fun circuits that I constructed using potentiometer and a speaker:

and two Force-Sensitive Resistors (FSR’s) and two LED’s:

  •  

Leave a Reply

Your email address will not be published. Required fields are marked *