Lab1:

The Artemis board

Setup and get familiar with the Arduino IDE and the Artemis board

Posted by Zhongqi Tao on January 31, 2023

The purpose of the first lab is to get familiar with the Artemis nano board and the Arduino IDE. Example codes from IDE are used to verify the Artemis board works properly.

At the end of this lab, several functions including blink the LED, read/write serial messages over USB, display the output from the onboard temperature sensor, and measure the loudest frequency recorded by the Pulse Density Microphone are achieved using example codes. The board is programmed to blink LED when musical "A" note (frequency around 440 Hz) is detected.

Blink LED

The first part of this lab is to blink the LED on the Artemis board using the provided example code from IDE. The video below shows the LED blinks periodically.

Example Blink LED program running on Artemis board.

Serial Output

The second part of this lab is to test the Serial port communication function between the board and the laptop. The Serial communication is realized using example code from IDE.

As the video below demonstrates, some words and sentences were typed into Serial Monitor and they were echoed on the screen to demonstrate the function works properly.

Example serial program running on Artemis board.

Analog Read

The third part is to test the temperature sensor on the Artemis board and the function to read analog inputs from sensors and convert them into digital form and display on the screen.

The function was achieved by using the example code from IDE, and was verified by putting finger on the Artemis board to try to increase the board temperature. According to the video below, it is shown that initially the temperature sensor gave a reading over 33000, after a finger was put on the board, the temperature output rised to over 34000 gradually, which means the temperature sensor works well.

Example program to get output from temperature sensor on Artemis board.

Microphone Output

This part is to test the onboard Pulse Density Microphone. The example code from IDE conducts FFT on the audio signals, extract and print out the highest frequency.

As shown in the video, when the frequency generator changed the frequency, the printed frequency displayed on the screen detected by Artemis board changed correspondingly, despite there was a slight difference (only a few Hertz), probably due to FFT computation error in the example program. But in general, both the onboard microphone and the example program worked well.

Example program to measure the loudest frequency recorded by the Pulse Density Microphone.

Musical "A" Note Detection

The final task is to blink the onboard LED when the musical "A" note is detected. It needs to combine program from 'Blink LED' and 'Microphone Output' and add an 'if' statement to achieve this function.

According to Wikipedia, the frequency of musical "A" note is around 440 Hz, while considering the FFT computation error mentioned in last section, a frequency range was set in the 'if' statement instead of the exact 440 Hz frequency. As the video shows, 448 Hz was set on the frequency generator to represent the "A" note sound and after the sound was detected, the onboard LED started to blink, and the detected frequency shown on the screen was 446 Hz which was within the range between 440 Hz - 450 Hz setting in the 'if' statement.

Modified program to blink LED when musical note "A" is detected.

Texts and Videos by Zhongqi Tao