Lab: Digital Input and Output

Goal:

Connect a digital input circuit and a digital output circuit to a microcontroller (Arduino nano 33).

Web: https://itp.nyu.edu/physcomp/labs/labs-arduino-digital-and-analog/digital-input-and-output-with-an-arduino/

Things Prepared:

Resistors(200-ohm, 330ohm, 10-kilohm), LEDs, 8-ohm speaker(might not use), pushbuttons, Arduino Nano 33 IoT, and Jumper wires.

Start: Prepare the breadboard

The red and white lines are the voltage bus, and the blue and black lines are the ground bus.

Add a Digital Input: a Pushbutton

The resistor as a pulldown resistor provides the digital input pin with a connection to the ground. Without it, the input will behave unreliably.

Add Digital Outputs: LEDs

Since I don’t have a 220-ohm resistor, I will use 330-ohm resistors first. If the light is too dim then I will try to switch to 200 ohms.

Program the Arduino:

When I try to upload, I got this message and I found that the port changed when uploading. And port changed, the board disconnected and connected while uploading. Trying to find a solution for now.

Find something here: https://forum.arduino.cc/t/com-port-change-with-nano-33-ble-sense/859756/2

Some of the newer NANO’s have as sterretje explained what amounts to TWO ports.

There is the standard one you see when you first power up or connect the board.
Then there is a second one often referred to as the BOOTLOADER port.

Arduinos IDE offerings will, during upload swap to that second port as part of the upload procedure.
When upload is complete they normally revert the port back to the first one.

There can be occasions (OS dependant) where ports are not always released properly back to the original one.

Doesn’t work though, plan to try some different circuits to test the board, breadboard and USB cable to identify the problem.

Update 07/19/2022:

It works! Just after I restarted my laptop and I don’t know why.


Previous
Previous

Lab: Analog Input, Analog Output with Tone & ServoMotors

Next
Next

Observation Blog