Part1: Blink it up
After the installation of the latest version of Arduino IDE and the Arduino core for Apollo3, I hooked the Artemis board up to the laptop and uploaded the 'Blink' example. I encountered the problem of "serial port not selected" for the first time. After making sure the port number connecting to the Artemis and selecting it in the 'Tools->Port', I successfully uploaded the example. The 'Blink' example initializes digital pin LED_BUILTIN as an output and then repeatedly turns an LED on for one second, then off for one second. Here is the demo video.
Part2: Serial Port
'Serial' is a built-in example of Artemis, in which if you send a number to the board it will echo back. By opening the Serial Monitor, we can see the results. Here is the demo video, in which I send the number ‘5960’ separately.
Part3: Analog Read
Artemis has some internal ADC channels to measure the differential pairs, internal die temperature, VCC, and VSS voltage. This example focuses on the temperature change. As shown in the video, the temperature counts are around 33100 at the very beginning. After I put the chip near the heater, the counts were going higher and higher, up to 36000 counts in 20 sec.
Part4: Microphone Output
This example demonstrates how to use the pulse density microphone (PDM) on Artemis boards. The Serial will feedback the real-time loudest frequency. In the following demo, I used a piano scale to play a scale and the loudest frequency changed with it.
Additional Task: Voice-activated LED
A Voice-activated LED will be able to light up when you speak or whistle, and off otherwise.
To achieve this, I edited a program based on the 'MicrophoneOutput'.
In the 'setup()', I added the following line to initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
As for the loop part, I added a judgement statement in the printLoudest()
function.
When the loudest frequency is larger than 500, it can be regarded as voice or whistle and the LED will be on.
if(ui32LoudestFrequency>500){
Given that I can't whistle, I said the letter 'A' instead in the attached demo video.
Serial.printf("LED ON\n");
digitalWrite(LED_BUILTIN, HIGH);
}
else{
Serial.printf("LED OFF\n");
digitalWrite(LED_BUILTIN, LOW);