I am trying to write a Java (SE 7 Embedded u10) program that reads temperature from a Analog Temp Sensor TMP36 (http://www.adafruit.com/products/165) using a MCP3800 ADC (https://www.adafruit.com/products/856).
In order to read analog data I need to use the following pins I think (outside of GND 3.3V):
- DOUT (Data Out from MCP3008)
CLK (Clock pin)
DIN (Data In from Raspberry Pi),
CS (Chip Select).
- VDD -> 3.3V
VREF -> 3.3V
AGND -> GND
CLK -> #18
DOUT -> #23
DIN -> #24
CS -> #25
DGND -> GND
- Pin #18 (CLK) as a GPIO Out Pin
Pin #23 (DOUT) as a GPIO In Pin
Pin #24 (DIN) as a GPIO Out Pin
Pin #25 (CS) as a GPIO Out Pin
- pin1 -> 3.3V
pin2: analog out --> channel0 on mcp3008 (pin1)
I have googled and binged around but can't fins any examples, so maybe someone on this forum has an idea on how to get me started?