Skip to content

How to Upload this Code to a Microcontroller

K Gray edited this page Nov 27, 2022 · 2 revisions

What you Need

  • USB-C cable
  • PC

Step 1; Download the IDE

First, download the Arduino IDE from here: https://downloads.arduino.cc/arduino-ide

Step 2; Download the Code

Once you have the IDE downloaded, download this Ionizing Radiation Detector code by clicking here.

Step 3; Open the Code in the IDE

Once the code is downloaded, open the downloaded folder and click on the "geiger.ino" file. It will automatically open in the Arduino IDE. Be patient though, as this may take up to a minute to open.

Step 4; Select Microcontroller and USB Port

You have to select the correct microcontroller and USB port before you are able to program. Click on tools / board / Arduino AVR Boards / Arduino Leonardo. That sets the board to Leonardo (Atmega32-U4). Now, click on tools / port / '/dev/cu/usbmodem14101' (''this is the usual port on MacOS for a Leonardo).

Step 5; USB Cable

Now, plug the USB C cable into your PC and into the Leonardo.

Step 6; Upload the Code

Click the arrow (upload) button to the top left of the sketch, and it will program the board!

Step 7; The Serial Monitor

If you click the magnifying glass icon to the top right of the sketch, it will open the Serial Monitor. This is great for debugging!