Lab 1 Artemis
The purpose of this lab was to become more accustomed with the Artemis board that will be used throughout the rest of the class. We explored the onboard funcions such as the microphone, LED, and temperature sensor as well as the serial communication by connecting the board to our computer. Since an Arduino IDE was used with this board, some of the examples that are available with the IDE were incorporated.
Blink Example
This Arduino example blinks the LED on and off, as seen in the video above.
Serial Example
The next Arduiono example is Serial. This was used to test the UART communication between the board and the computer. The Artemis Nano board that we are using as two UART ports, and one was used via USB-C. However, in order to get the messages in a readable format, the baud rate needed to be the same in the sample code and the serial monitor. In this particular example, 115200 was used. This is seen in the video below - where hello is types in the monitor, and then displayed above.
Analog Read Example
In this example. The Artemis Nano has an onboard analog to digital converter (ADC) which converts voltage to a digital signal that can be read by the microcontroller. We want to see the values measured from the ADC pin on the temperature sensor to utilize the AnalogRead() function. In the first image, we can see the different outputs from the example code. The analog voltage on the specific pin - external (counts), the source voltage across a voltage divider - vcc/3, the ground voltage - vss(counts), and the time are the outputs that are not relevant to this specific task. In the video above, we can see the temp (counts) output steadily increase from 33000 to 33500 via the serial monitor. This was a slight increase because I was applying pressure from my hand on the temperature sensor that is on the board.
Microphone Output Example
The Artemis Nano also has an microphone that outputs the frequency of the audio via the serial monitor. It is built with the PDM (pulse-density modulation) library which converts an analog signal to a single bit signal and FFT library to calculate the appropiate frequency. In the video above, I am speaking into the microphone and the frequency changes according to my voice.