CSCI 235 — Arduino starting with Tinkercad Circuits
What you do with an Arudino (and a computer)
Arduino
External connections
Getting started with Tinkercad Circuits
Things to do
- Turn on LED with switch
- 3.0V coin battery
- pushbutton switch
- 330 Ω resistor
- LED
- Using a simulated Arduino
- Add Arduino Uno R3
- Bring up code editor
- Start similation
- Stop similation
- Change time LED is high to 0.2 secs
- Got to Text mode
- It may look like Processing
- But it is C++
- Get out of block programming mode
- Do real C — Add definition for
ledPin
(as const int)
and modify loop
- Adding an LED without breadboard
- Leave Code mode
- Add an LED connected to pin 7
- Have pin 7 LED and the internal LED to alternate on and off
- Adding a breadboard
- In
+ components add a small breadkboard

- Wire exactly as shown above. Use the same colors for wire.
- Make sure you have no short circuits!
- Adding an LED
- In
+ components add a 330 Ω resistor and
an LED.
- Wire them into Pin 4. Be sure the
cathode of the LED is
connected to ground.

- Simulate
- Adding a switch
- Use pin 2.
- Pushbutton switches (aka tactile button switches) are tricky.
Be sure you have them oriented corrected.
Also, if you step on them, throw them away.

- Modify Arduino program to use Pin 2. Use
pinMode() to enable the internal
pullup.
- Using
digitalRead() to read Pin 2.
- When the button is switched, light up the LED.
- Adding a speaker
- Replace the LED with a Piezoelectric buzzer.

- If you turn the Piezo off and on quickly, it will make a tone.
Unfortunately, sound is not enabled on the computers in the lab.
- Three projects if time permits
- Make a stop light
- Make a button that flashes a LED
- Make a button that flashes a LED for 60 seconds after a button is pressed