Systems Programming (XMUT): Lab Exercise

Choose your group and your Kit box

Except for the assignments and Lab 5, all the labs must be in group works. So, you need to choose your group of 4 students.

info You need to remember that all students must be in a group. Once you choose your group, you cannot change your group.

You need to give the following information to your co-teacher:

  • Group Name
  • Group members (4 students)
    • First name
    • Given name
    • Student ID

Arduino, hello world!

First Step: Tinkercad simulator

The first Arduino program you construct will make the internal LED on the Arduino blink.

First, you will design it and test it on the Tinkercad simulator. Then you will run your program on the real Arduino.

Video View the video to see how to use Tinkercad.

All Arduino programs have a similar structure. Since Blink is a simple program, it is easy to understand the program structure by examining it.

PICK Enter this program into the Tinkercad simulator (as shown in the video) and run it.

   void setup() {
      // initialize the digital pin as an output.
      // Pin 13 has an LED connected on most Arduino boards:
      pinMode  (13, OUTPUT ); 

   void loop() {
      digitalWrite(13, HIGH);   // set the LED on
      delay(1000);              // wait for a second 
      digitalWrite(13, LOW);    // set the LED off 
      delay(1000);              // wait for a second

Second step: running on the real Arduino.

Now install the Blink program on the Arduino and check that it works correctly.

Test yourself: Try changing the delay times to see what results you get. Here are a couple of things you can try:
  • Make the LED blink the SOS signal (the international standard distress signal): 3 short blinks, 3 long blinks, 3 short blinks.
  • See how fast you can make the LED blink before it appears to be on all the time.