Lab: Microcontroller Digital Input and Output

This week I opened the kit and prepped the breadboard according to the lab instructions. It was more difficult than I expected pushing and pulling in the transistors, and I learned the hard way that transistors can be sharp and pokey. Of the other pronged components I tried to use to loosen the new breadboard, the transistor was the best. I will be using the transistor as I continue to fit other components into the breadboard.

Prepping the new breadboard with a transistor.

Prepping the new breadboard with a transistor.

Three ruined transistors later, the microcontroller is finally in.

Three ruined transistors later, the microcontroller is finally in.

I followed the Lab: Digital Input and Output with an Arduino guide and placed components accordingly. Then the last part was setting up the Arduino IDE, installing the Nano 33 IoT board in the board manager, and coding the input/output program.

Breadboard all set-up!

Breadboard all set-up!

Connecting the USB to my laptop.

Connecting the USB to my laptop.

I realized that I didn’t have a USB-A to USB-C converter, so I brought the breadboard home to try it out again when I had my converter.

Setting up the code in the Arduino IDE.

Setting up the code in the Arduino IDE.

Plugging it to my laptop with my USB dongle.

Plugging it to my laptop with my USB dongle.

PXL_20220916_155947294.jpg

Removed the 10k ohm resistor.

Removed the 10k ohm resistor.

Since the LED lights didn’t light up when I ran the code, I realized there was something wrong and started debugging. I thought maybe I had confused the 10k ohm resistor with 10 ohm resistor, since I wasn’t sure if I was reading the bands correctly, so I went back to the floor to switch it out.

Switching out all the resistors.

Switching out all the resistors.

The bent ones.

The bent ones.

After switching out the resistors, my Arduino code still wasn’t running correctly, so I continued debugging.

After some investigation, I realized that I wasn’t checking if my wires were properly connecting power/positive, to the transistors, resistors, and ground correctly. After double-checking that my power sources were always on the same row as a transistor and resistor, which eventually led to ground, I re-ran my code and it worked!

The yellow LED lights up!

The yellow LED lights up!

Done!

Done!

Lab: Analog Input

After doing the input/output lab, the analog input lab was pretty easy to follow along and complete. The only issue I ran into was that the potentiometer fit a little loose in the breadboard, so I had to make sure to keep pressing it down as I turn the dial.

PXL_20220916_214553327.NIGHT.jpg

PXL_20220916_215410096.jpg

Then I switched the LED light out for the 8ohm speaker for the second part of the lab.

Again, the biggest issue I had was ensuring that I am pressing down on the dial as I turn it. Along with that, I had a bit of confusion about whether the speaker’s ground and positive should connect to the same on the breadboard or if they should cross vice-versa. I connected them + to + and - to -, and though it was a bit loose as I did not solder the wire connections to the speaker as shown in the videos, it worked and I was able to hear a tone that reminded me of a early-2000s Christmas card that you would receive from a distant relative but without a melody.

light_dial.mov

sound_dial.mov