ARRAY_LAST_PIO,
};
-#define TMP101_ADDR 0x90 /* Pin Addr0 (pin5 of tmp101) connected to GND */
+
+
+/***************************************************************************** */
+/* Temperature */
+
+#define TMP101_ADDR 0x94 /* Pin Addr0 (pin5 of tmp101) connected to VCC */
struct tmp101_sensor_config tmp101_sensor = {
.bus_num = I2C0,
.addr = TMP101_ADDR,
.resolution = TMP_RES_ELEVEN_BITS,
};
-
-
-/***************************************************************************** */
-/* Temperature */
-/* The Temperature Alert pin is on GPIO Port 0, pin 7 (PIO0_7) */
-/* The I2C Temperature sensor is at address 0x94 */
void temp_config(int uart_num)
{
int ret = 0;
i2c_on(I2C0, I2C_CLK_100KHz, I2C_MASTER);
- /* Configure onboard temp sensor */
+ /* Configure temp sensor */
temp_config(UART0);
+ msleep(1);
while (1) {
- /* I2C Test using TMP101 temperature sensor */
temp_display(UART0);
}
return 0;