Objective

The goal of this lab was to get acquainted with the Artemis Nano board by running a few basic scripts on just the board with no periphrials.



Materials Used



Procedure

To start with I downloaded the library for the board found here, because I already had the Arduino IDE set up on my computer
This link provides both instructions to set up the library and to run a few example programs
Once the board was set up, I ran three example programs:
1. The blink code to blink the built-in LED

2. The serial code to test the serial console

3. Code that measures the temperature of the board, heated up under a lamp on my desk

4. Code that observes and reports microphone frequency information



Next, it was time to edit the example code given to write a program that would turn the LED on when whistling, and turn off otherwise
Admittedly I'm a terrible whistler, so it's pretty much just imprecise squeaking.
Therefore, I simply edited the code by changing one line to turn the light on if the primary frequency was above 4k, which seemed to work well enough in my environment.


          Serial.printf("Loudest frequency: %d         \n", ui32LoudestFrequency);

          if (ui32LoudestFrequency > 4000) {
            digitalWrite(LED_BUILTIN, HIGH);
            }
          else { 
            digitalWrite(LED_BUILTIN, LOW);
            }

      

As you can see in this video, I am charging the battery on the nano while having it respond properly to my pitiful squeaking.

Next, I just checked to make sure it would still work on battery