This week I decided to really emphasize on understanding the code and the difference between analog and physical. I realized that I lack basic knowledge in coding and I needed to research and gather my questions.

Spinning small haptic game / week 3


Questions :

  1. On the video it say it is Analog. Is it pseudo analog ? ! If it is analog why do we write digitalWrite and not analogWrite

Screen Shot 2022-09-22 at 10.15.47 PM.png

  1. in Analog input why don’t we declare the pinMode ( #, INPUT ) (#, Output ) in set up and why do we do so if it is digital?
  2. when do we pinMOde (#, Input ) and when pinMode(#, OUtput ) ?
  3. Melody exercise.. why it is only working if we upload the pitches file to the Arduino and not the file that contains the steps ?

LAB 2

  1. Question in the Code : why do we use attach and not PinMode ?

  2. what is the difference between the 2 examples ?

    Screen Shot 2022-09-25 at 9.45.32 PM.png

it seems to me that there aren’t may changes on how the code responds…

Labs - documentation

Screen Shot 2022-09-23 at 7.16.31 PM.png

I used a photo sensor. I tested an analogRead (A0) and I was getting results from 0 - 19 .

I adjusted the map of the frequency to go from ( 0 to 19 ) .

Here is a picture of the set up ,