{"id":13343,"date":"2025-07-18T10:29:06","date_gmt":"2025-07-18T14:29:06","guid":{"rendered":"https:\/\/itp.nyu.edu\/physcomp\/?page_id=13343"},"modified":"2025-11-11T05:22:18","modified_gmt":"2025-11-11T10:22:18","slug":"pedro-oliveira","status":"publish","type":"page","link":"https:\/\/itp.nyu.edu\/physcomp\/itp\/sections\/pedro-oliveira\/","title":{"rendered":"Pedro Oliveira"},"content":{"rendered":"\n<p id=\"block-608aeaed-c8aa-40f7-a5e3-3669f589c6a6\">Pedro Oliveira<br>pedro.itp(at)nyu.edu<br><a href=\"https:\/\/calendar.app.google\/YkYRCZxbWgKaqE1K6\">Office hours<\/a><br>NYU ITP, Fall 2025<br><strong>TUE 12:20pm to 2:50pm <\/strong> \/ <strong>370 Jay St, Room 411<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"block-0bd06c57-a676-4550-8088-6750bc9eb46e\"><span class=\"ez-toc-section\" id=\"Class_Links\"><\/span>Class Links<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul id=\"block-657a8d10-8975-49b1-837d-744d42c36242\" class=\"wp-block-list\">\n<li><a href=\"https:\/\/itp.nyu.edu\/physcomp\/syllabus-fall-2025\/\" data-type=\"link\" data-id=\"https:\/\/itp.nyu.edu\/physcomp\/syllabus-fall-2025\/\">Syllabus<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/wiki#agreement--class-expectations\">Agreement and Class Expectations<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/itp.nyu.edu\/physcomp\/week-to-week-activity\/\">Week-by-week activity<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\">Github Examples<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"block-d8620b8f-b484-4f22-8f62-6bc9c594b5ef\"><span class=\"ez-toc-section\" id=\"Useful_Links\"><\/span>Useful Links<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul id=\"block-94d04695-50d3-4c6e-85a7-425d1d4fcf3d\" class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.arduino.cc\/reference\/en\/\">Arduino Language Reference<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/docs.arduino.cc\/hardware\/nano-33-iot\">The Nano 33 IOT Reference<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/itp.nyu.edu\/physcomp\/itp\/#Physical_Computing_Workshops_by_Residents\">Residents PComp Help Sessions <\/a><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\" id=\"block-62d44c5f-f0a0-4629-9203-f6d70b4225ec\"><img decoding=\"async\" src=\"https:\/\/itp.nyu.edu\/physcomp\/wp-content\/uploads\/Nano33IoT_pinouts.png\" alt=\"Arduino NANO 33 IoT Diagram\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"block-bb38e9d2-ef8a-4ae6-ac16-337928f395ad\"><span class=\"ez-toc-section\" id=\"How_to_Use_the_Website\"><\/span>How to Use the Website<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"block-fe8ecd60-1667-49b6-920d-e811437b100f\">The ITP Pcomp website has a wealth of information that is organized in 3 ways:<\/p>\n\n\n\n<ol id=\"block-a21bbaa2-169a-427c-a542-ae12b9baba40\" class=\"wp-block-list\">\n<li>The <a href=\"https:\/\/itp.nyu.edu\/physcomp\/week-to-week-activity\/\">Week-to-Week<\/a> gives a chronological run down of all the subject matter that will be covered as we move through the semester, as well as assignments and labs that you must do on your own.<\/li>\n\n\n\n<li>The <a href=\"https:\/\/itp.nyu.edu\/physcomp\/lessons\/\">Lessons<\/a>, <a href=\"https:\/\/itp.nyu.edu\/physcomp\/videos\/\">Videos<\/a>, and <a href=\"https:\/\/itp.nyu.edu\/physcomp\/labs\/\">Labs<\/a> pages covers a lot of the same information, but organized by subject matter and in different formats.<\/li>\n\n\n\n<li>The <a href=\"https:\/\/itp.nyu.edu\/physcomp\/resources\/#\">Resources<\/a> section contains information that are useful for physical computing in general, like suppliers, links to other useful sites, recommended tools and parts to get started, and more.<\/li>\n<\/ol>\n\n\n\n<p id=\"block-ef0c1d3b-d39a-48ce-b1de-95d3ecb8a38c\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"block-cab15879-cdf8-4262-b4df-85e34e18c688\"><span class=\"ez-toc-section\" id=\"Blogs_and_Documentation\"><\/span>Blogs and Documentation<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p id=\"block-581ef25d-1eda-452f-8052-62026157a437\">Document your progress in the class online in a regular blog as you go. At a minimum, you should summarize any insights and questions you have from each week\u2019s lab assignments, and document your production projects and technical research thoroughly. You can find guidelines for good documentation, and several examples, on the <a href=\"https:\/\/itp.nyu.edu\/physcomp\/journals-documentation\/\">Journals &amp; Documentation page.<\/a><\/p>\n\n\n\n<p id=\"block-c04cc925-612c-446c-8f2a-fbd4ceb90b34\">Setup your blog and add the link to this <a href=\"https:\/\/docs.google.com\/spreadsheets\/d\/1I8GiLDvf6edYIjQdd7V6ip00LDmLikFWV5SWjvRJCwI\/edit?usp=sharing\">spreadsheet<\/a>, please. <em>(You will need to log in with your NYU account).<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"block-9ead52c0-04d1-4b6f-9592-293803ff55e4\"><span class=\"ez-toc-section\" id=\"Class_Notes\"><\/span>Class Notes<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>(Here is where you will find the class Notes)<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity is-style-wide\"\/>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<h5 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Class_01\"><\/span>Class 01<span class=\"ez-toc-section-end\"><\/span><\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.tigoe.com\/blog\/category\/physicalcomputing\/606\/\">What does the user do?<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/itp.nyu.edu\/physcomp\/labs\/breadboard-layouts\/\">Breadboard Layouts<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/itp.nyu.edu\/physcomp\/videos\/videos-tools\/#Care_of_Your_Nano_33_IoT\">Care of your Arduino Nano 33 IOT<\/a><\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/itp.nyu.edu\/physcomp\/week-to-week-activity\/\">Week-to-Week<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/docs.google.com\/document\/d\/1rxH_g-jKg0d53OOFyRn8rKkFkBG3Aya2eURkxGgWOrY\/edit\">Residents Help Sessions and Workshops<\/a><\/li>\n<\/ul>\n\n\n\n<p>Formula:<\/p>\n\n\n\n<p>INPUT -&gt; COMPUTATION -&gt; OUTPUT<\/p>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<h5 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Class_02\"><\/span>Class 02<span class=\"ez-toc-section-end\"><\/span><\/h5>\n\n\n\n<p>Electricity and components:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/000_BasicCircuits\">000_Basic Circuits<\/a><\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Class_03\"><\/span>Class 03<span class=\"ez-toc-section-end\"><\/span><\/h5>\n\n\n\n<p>Digital Input and Digital Output<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/functions\/digital-io\/pinMode\/\">pinMode()<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/functions\/digital-io\/digitalwrite\/\">digitalWrite()<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/functions\/digital-io\/digitalread\/\">digitalRead()<\/a><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ OUTPUT \/ INPUT\npinMode(13, OUTPUT);\npinMode(2, INPUT);\n\n\/\/ Write \/ Read\ndigitalWrite(13, HIGH);\ndigitalRead(2);<\/pre>\n\n\n\n<p>Digital IO Examples:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/001_LED\">001_LED<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/002_Blink\">002_Blink<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/003_Variables\">003_Variables<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/004_CheckInput\">004_CheckInput<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/005_Button\">005_Button<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/006_Toggle\">006_Toggle<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/007_Timer\">007_Timer<\/a><\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Class_04\"><\/span>Class 04<span class=\"ez-toc-section-end\"><\/span><\/h5>\n\n\n\n<p>Analog Input and &#8220;Analog Output&#8221; (PWM)<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/functions\/digital-io\/digitalwrite\/\"><\/a><a href=\"https:\/\/docs.arduino.cc\/language-reference\/en\/functions\/analog-io\/analogWrite\/\">analogWrite()<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/functions\/digital-io\/digitalread\/\"><\/a><a href=\"https:\/\/docs.arduino.cc\/language-reference\/en\/functions\/analog-io\/analogRead\/\">analogRead()<\/a><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ You do not need to call pinMode() to set the pin as an Analog Input or Analog Output(PWM).\n\n\/\/ Write \/ Read\nanalogWrite(9, 150);  \/\/ ~PWM Pin  (Output)\nanalogRead(A0);       \/\/ Analog Pin (Input)<\/pre>\n\n\n\n<p>Analog IO Examples:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/008_PWM\">008_PWM<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/009_RGB\">009_RGB<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/010_Counter\">010_Counter<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/011_ForLoop\">011_ForLoop<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/012_Fade\">012_Fade<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/013_CheckAnalogInput\">013_CheckAnalogInput<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/014_Dimmer\">014_Dimmer<\/a><\/li>\n<\/ul>\n\n\n\n<p>Tone Example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/015_Tone\">015_Tone<\/a><\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Class_05\"><\/span>Class 05<span class=\"ez-toc-section-end\"><\/span><\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Soldering by Adafruit: <a href=\"https:\/\/learn.adafruit.com\/adafruit-guide-excellent-soldering\/tools\" data-type=\"URL\" data-id=\"https:\/\/learn.adafruit.com\/adafruit-guide-excellent-soldering\/tools\" target=\"_blank\" rel=\"noreferrer noopener\">Link<\/a><\/li>\n\n\n\n<li>Connectors by Sparkfun: <a href=\"https:\/\/learn.sparkfun.com\/tutorials\/connector-basics\/all\" data-type=\"URL\" data-id=\"https:\/\/learn.sparkfun.com\/tutorials\/connector-basics\/all\" target=\"_blank\" rel=\"noreferrer noopener\">Link<\/a><\/li>\n\n\n\n<li>Connectors &amp; Enclosures by David Rios: <a href=\"https:\/\/docs.google.com\/presentation\/d\/1E_4cQLhBME7KFPvLzJHdOL-uW9GvDmZRxuDMOzm8eBs\/edit#slide=id.p\" data-type=\"URL\" data-id=\"https:\/\/docs.google.com\/presentation\/d\/1E_4cQLhBME7KFPvLzJHdOL-uW9GvDmZRxuDMOzm8eBs\/edit#slide=id.p\" target=\"_blank\" rel=\"noreferrer noopener\">Link<\/a><\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Class_06\"><\/span>Class 06<span class=\"ez-toc-section-end\"><\/span><\/h5>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/learn.sparkfun.com\/tutorials\/motors-and-selecting-the-right-one\/all\"><em>Motors and Selecting the Right One<\/em><\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/learn.adafruit.com\/adafruit-motor-selection-guide\"><em>Adafruit Motor Guide<\/em><\/a><\/li>\n<\/ul>\n\n\n\n<p>Examples:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/018_Math\">018_Math<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/019_Map\">019_Map<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/020_ServoPos\">020_ServoPos<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/021_ServoPot\">021_ServoPot<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/022_ServoConsole\">022_ServoConsole<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/023_ServoSerial\">023_ServoSerial<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/024_DCMotorPWM\">024_DCMotorPWM<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/025_DCMotorSerial\">025_DCMotorSerial<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/026_StepperMotor\">026_StepperMotor<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/juxtapix\/PComp\/tree\/main\/examples\/026_StepperSerial\">026_StepperSerial<\/a><\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Class_07\"><\/span>Class 07<span class=\"ez-toc-section-end\"><\/span><\/h5>\n\n\n\n<p>For week 8:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Document your Midterm project and update on your blog <\/li>\n\n\n\n<li>Upload the feedback to this <a href=\"https:\/\/docs.google.com\/document\/d\/1ZFKTy04QzN8W5DK5iSBSzxN-PVwegvJKJazFc1Kf2zI\/edit?usp=sharing\">[link]<\/a><\/li>\n<\/ol>\n\n\n\n<h5 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Class_08\"><\/span>Class 08<span class=\"ez-toc-section-end\"><\/span><\/h5>\n\n\n\n<p>Serial Communication<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/functions\/communication\/serial\/begin\/\">Serial.begin()<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/functions\/communication\/serial\/write\/\">Serial.write()<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/functions\/digital-io\/digitalwrite\/\"><\/a><a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/functions\/digital-io\/pinmode\/\">Serial.<\/a><a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/functions\/communication\/serial\/print\/\">print<\/a><a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/functions\/digital-io\/digitalwrite\/\"><\/a><a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/functions\/digital-io\/pinmode\/\">()<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/functions\/communication\/serial\/println\/\">Serial.println()<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/functions\/communication\/serial\/read\/\">Serial.read()<\/a><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ Sets the data rate in bits per second (baud) for serial data transmission. For communicating with Serial Monitor, make sure to use one of the baud rates listed in the menu at the bottom right corner of its screen. You can, however, specify other rates - for example, to communicate over pins 0 and 1 with a component that requires a particular baudrate.\n\nSerial.begin(9600); \n\n\/\/ Writes binary data to the serial port. This data is sent as a byte or series of bytes; to send the characters representing the digits of a number use the print() function instead.\n\nSerial.write(45);\n\n\/\/ Prints data to the serial port as human-readable ASCII text. This command can take many forms. Numbers are printed using an ASCII character for each digit. Floats are similarly printed as ASCII digits, defaulting to two decimal places. Bytes are sent as a single character. Characters and strings are sent as is\n\nSerial.print('A');\n\n\/\/ Prints data to the serial port as human-readable ASCII text followed by a carriage return character (ASCII 13, or '\\r') and a newline character (ASCII 10, or '\\n'). This command takes the same forms as Serial.print().\n\nSerial.println(\"Hello\");\n\n\/\/ Reads incoming serial data.\n\nSerial.read();<\/pre>\n\n\n\n<p>Serial Communication Examples:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/editor.p5js.org\/juxtapix\/sketches\/Ytkb6PyMx\">Arduino -&gt; p5js    <\/a>\/\/ Single Value<\/li>\n\n\n\n<li><a href=\"https:\/\/editor.p5js.org\/juxtapix\/sketches\/QVK_oqmUH\">Arduino -&gt; p5js<\/a>    \/\/ Parse Multiple Values<\/li>\n\n\n\n<li><a href=\"https:\/\/editor.p5js.org\/juxtapix\/sketches\/UP2KkdqWo\">p5js &lt;-&gt; Arduino<\/a> \/\/ Send and Receive<\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Class_09\"><\/span>Class 09<span class=\"ez-toc-section-end\"><\/span><\/h5>\n\n\n\n<p>Serial Communication<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"1080\" src=\"https:\/\/itp.nyu.edu\/physcomp\/wp-content\/uploads\/nano33BS_12_circuit.png\" alt=\"Arduino NANO RX TX Diagram\" class=\"wp-image-11177\" srcset=\"https:\/\/itp.nyu.edu\/physcomp\/wp-content\/uploads\/nano33BS_12_circuit.png 1920w, https:\/\/itp.nyu.edu\/physcomp\/wp-content\/uploads\/nano33BS_12_circuit-768x432.png 768w, https:\/\/itp.nyu.edu\/physcomp\/wp-content\/uploads\/nano33BS_12_circuit-1536x864.png 1536w, https:\/\/itp.nyu.edu\/physcomp\/wp-content\/uploads\/nano33BS_12_circuit-1200x675.png 1200w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n\n\n\n<pre id=\"block-cc066a0f-7cba-4232-843c-14e9d5952002\" class=\"wp-block-preformatted\">\/\/ UART is the communication protocol we use to communicate the PC to the board through the USB cable. In some older boards, TX and RX pins are used for communication with the computer, which means connecting anything to these pins can interfere with that communication, including causing failed uploads to the board. This is not the case for the Nano or MKR families, since these ones have two separate channels, using Serial for the communication with the computer and Serial1 for the communication with any other device through UART.\n\n\/\/ Serial through the USB cable\nSerial.begin(9600);\n\n\/\/ Serial through the pins RX and TX (Nano 33 IOT)\nSerial1.begin(9600);\n<\/pre>\n\n\n\n<h5 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Class_10\"><\/span>Class 10<span class=\"ez-toc-section-end\"><\/span><\/h5>\n\n\n\n<p>Final Proposals [<a href=\"https:\/\/docs.google.com\/spreadsheets\/d\/1I8GiLDvf6edYIjQdd7V6ip00LDmLikFWV5SWjvRJCwI\/edit?usp=sharing\">link<\/a>]<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/learn.sparkfun.com\/tutorials\/i2c\">i2c<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/learn.adafruit.com\/i2c-addresses\">i2c addresses<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/learn.sparkfun.com\/tutorials\/serial-peripheral-interface-spi\">SPI<\/a><\/li>\n<\/ul>\n\n\n\n<h5 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Class_11\"><\/span>Class 11<span class=\"ez-toc-section-end\"><\/span><\/h5>\n\n\n\n<p>USB &#8211; HID<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/itp.nyu.edu\/physcomp\/lab-keyboard-control\/\">keyboard<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/itp.nyu.edu\/physcomp\/labs\/lab-mouse-control\/\">mouse<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/tigoe\/hid-examples\">HID<\/a><\/li>\n<\/ul>\n\n\n\n<p><strong>A note from Tom: <\/strong> <em>&#8220;All Arduinos appear to your personal computer&#8217;s operating system as an asynchronous serial port, sometimes called a <strong>COM port<\/strong> or Universal <strong>Asyncronous Receiver-Trasmitter (UART)<\/strong>. This is its USB profile, and when you plug it into your computer, the operating system notes that profile and adds it to the list of USB devices. When you program an Arduino to behave as an HID device, you&#8217;re giving it an additional USB profile.<\/em><\/p>\n\n\n\n<p><em>When you include the Keyboard library in a sketch, your board&#8217;s serial port number will change. For example, on MacOS, if the port number is <\/em><code>\/dev\/cu.usbmodem14101<\/code>, <em>then adding the Keyboard library will change it to<\/em> <code>\/dev\/cu.usbmodem14102<\/code>. <em>Versions of the Arduino IDE from 1.8.13 and higher will automatically adjust the serial port selected when you do this, but earlier versions won&#8217;t, and other applications using the serial port won&#8217;t, so you might need to make the adjustment yourself.&#8221;<\/em><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pedro Oliveirapedro.itp(at)nyu.eduOffice hoursNYU ITP, Fall 2025TUE 12:20pm to 2:50pm \/ 370 Jay St, Room 411 Class Links Useful Links How to Use the Website The ITP Pcomp website has a wealth of information that is organized in 3 ways: Blogs and Documentation Document your progress in the class online in a regular blog as you &hellip; <a href=\"https:\/\/itp.nyu.edu\/physcomp\/itp\/sections\/pedro-oliveira\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Pedro Oliveira&#8221;<\/span><\/a><\/p>\n","protected":false},"author":90,"featured_media":0,"parent":9,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[12,59],"tags":[],"class_list":["post-13343","page","type-page","status-publish","hentry","category-itp","category-section"],"_links":{"self":[{"href":"https:\/\/itp.nyu.edu\/physcomp\/wp-json\/wp\/v2\/pages\/13343"}],"collection":[{"href":"https:\/\/itp.nyu.edu\/physcomp\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/itp.nyu.edu\/physcomp\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/itp.nyu.edu\/physcomp\/wp-json\/wp\/v2\/users\/90"}],"replies":[{"embeddable":true,"href":"https:\/\/itp.nyu.edu\/physcomp\/wp-json\/wp\/v2\/comments?post=13343"}],"version-history":[{"count":15,"href":"https:\/\/itp.nyu.edu\/physcomp\/wp-json\/wp\/v2\/pages\/13343\/revisions"}],"predecessor-version":[{"id":13891,"href":"https:\/\/itp.nyu.edu\/physcomp\/wp-json\/wp\/v2\/pages\/13343\/revisions\/13891"}],"up":[{"embeddable":true,"href":"https:\/\/itp.nyu.edu\/physcomp\/wp-json\/wp\/v2\/pages\/9"}],"wp:attachment":[{"href":"https:\/\/itp.nyu.edu\/physcomp\/wp-json\/wp\/v2\/media?parent=13343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itp.nyu.edu\/physcomp\/wp-json\/wp\/v2\/categories?post=13343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itp.nyu.edu\/physcomp\/wp-json\/wp\/v2\/tags?post=13343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}