## Introduction: Laura: Emotional Compass Lamp

Laura is a "counseling" who is helping me to find myself and to understand where I want to go.

For his great help, I wanted to give him a present that represents the work we are doing. The inspiration came from the need to find my street, and not get lost in the various paths that life presents you. From this, I have devised a "compass / lamp" that, in addition to helping you keep the "direction", illuminates the path.

## Step 2: The Compass

The "compass" does not have cardinal points, because the "right" direction, you have to decide for yourself! She tells you only if you're following the path that you have chosen.

By turning the lamp, you change color by giving different emotions each time, and if for some reason you stop, you can activate the "rainbow" cycle, a continuous series of color shades of red, blue, and green.

## Step 3: The Electronic Construction

The electronic construction is very simple, Arduino, Led Neopixel matrix, magnetometer and a switch.

The magnetometer (HMC5883), connected to the Arduino pin A4 and A5 (Protocol I2c), through the "Adafruit_HMC5883_U.h" library, provides the magnetic intensity of the xy axes, and with the formula headingyx = atan2 (event.magnetic.x, event .magnetic.y) provides the angle of declination. The Neopixel Led, connected to pin 9, light up in a different color, depending on the angle of declination. The switch, connected to pin 8, using the internal pull-up, allows the lamp to change program type (Compass - Rainbow). Lamp construction

## Step 4: Lamp Construction

The hardest part for me was to build the lamp box, the base is a box made of plywood, while the shell is made of opal plexiglass square, glued with cyanoacrylate, to have more portability, I Also added a "Power Bank" battery for mobile phones.

## Step 5: Arduino Code

Arduino Libraries:

Most of the code was taken from the examples of the libraries, while the heart of the color change of the compass is:

```int headingDegreesyx = headingyx * 180/M_PI;    if (headingDegreesyx >= 0 && headingDegreesyx<90)
{
ResultB = 0;
}
{
ResultR = map(headingDegreesyx, 90, 180, 255, 0);
ResultG = 0;
}
{
ResultG = 0;