\documentclass[11pt]{article}
%Gummi|065|=)
\title{\textbf{Air Quality Sensor}}
\author{Steak Electronics}
\date{2018 (revised 2019)}
\begin{document}

\maketitle

\tableofcontents


\section{Overview}
To know when I need to clean my room. I usually vacuum every two or three weeks, but sometimes am lazy and I need a reminder. The dust sensor will be more motivation to get me to clean, when I see the dust levels increase. \footnote{Technically, I also get a rash from excess dust, which is another great motivator.}

\section{Work Log}
\subsection{Parts List}
\begin{itemize}
\item Shinyei PPD42NS Air Quality Sensor
\item MSP-EXP430G2553 V1.5
\item 5V adapter (required as MSP is 3.3V only)
\item SD Card adapter
\item Ethernet Module
\item Energia version 0101E0012 (or later, possibly)
  
  \end{itemize}
\subsection{Beginning}
Here are some things I learned working on this project.

\textbf{IDE}
I'm using Energia from energia.nu which is an Arduino IDE clone for TI Launchpads. This will allow for rapid development. And ease me into the TI platform.

\textbf{MSP-EXP430G2 V1.5}
There are different version of this. My particular board is the 
and as explained here: http://energia.nu/pin-maps/guide\_msp430g2launchpad/  and   http://energia.nu/pin-maps/guide\_msp430g2launchpad/
You need to rotate the UART jumpers to get UART to display correctly. Oddly enough you can choose a different chip in the boards list and serial will print out right... But switch the jumpers and the correct board will work with UART. Otherwise, it does not work out of the box for serial.print. Though the blink example sketch works.

\textbf{Dust Sensor}
The code for the dust sensor is found online easily. The pinout is tricky as the colours of the wire are nonsense, but the pinout seems to be the same for all sensors, and is: PIN 1 (closest to black box) GND, PIN 3, VDD (5+V), PIN 4 output A. there is also an output B for different readings (I think size) of dust. I'm not that particular (no pun intended) about my dust so I will go with the one most people are using.

\textbf{3.3V only on TI}
The TI takes input of USB but only outputs 3.3V. Fail. I'll through a 5V PSU on the board. It won't be connected to USB for its use anyways.

\textbf{POW function}
There is a pow function (power exponent) in arduino. In TI, I changed it to powf, and included math.h.

I'm not sure if my change was correct.

EDIT: looks like there is a LED tied to pin 14. I'm moving to pin 13. I meant to use 13 earlier but accidentally used the wrong pin and kept using it. Oops.

EDIT 2: Actually, I was reading from the wrong pin in software. Maybe I will leave it on the LED pin as you can see when the dust is firing off the sensor. Hm.... Neat.

EDIT 3: Yes, so I had to use powf instead of pow, and it works. The accidental incorrect pin was a bonus as it allows me to see visually how often the sensor is going off. Over time, I should have a vague grasp of the dust levels just looking at the light. Actually, I won't. Nevermind. The dust sensor reading, is too irregular for that.





\end{document}
