TMP421 on Arduino YUN

Questions about Modern Device and JeeLabs Sensors
Post Reply
FredSpringer
Posts: 2
Joined: Thu Jan 02, 2014 2:59 pm

TMP421 on Arduino YUN

Post by FredSpringer » Fri Jan 10, 2014 2:45 pm

Unlike on an Arduino Uno, the SDA and SCL signals on the Arduino Yun are not located at analog ports 4 and 5. SDA is now on digital port 2 and SCL is now on digital port 3 on the Yun microprocessor. This means a TMP421 sensor will not plug into the last 4 analog ports on a Yun. The clock and data signals are moved to the digital ports.

paul
Site Admin
Posts: 730
Joined: Mon May 12, 2008 4:19 pm

Re: TMP421 on Arduino YUN

Post by paul » Fri Jan 10, 2014 4:41 pm

If you're intrepid you can probably just mod the code in the library to remap for the correct pins.

We're due to get some Yun's in the shop soon (I've been traveling so will be back next week) so I can test your code or come up with some of my own to work with the Yun. We also have a pull request pending on the TMP421 code - so maybe we can merge this all into one or two updates.

Paul

FredSpringer
Posts: 2
Joined: Thu Jan 02, 2014 2:59 pm

Re: TMP421 on Arduino YUN

Post by FredSpringer » Fri Jan 10, 2014 9:10 pm

Yes, it works fine by altering the code to accommodate the YUN signal relocation

teshanab
Posts: 1
Joined: Wed Feb 03, 2016 4:24 pm

Re: TMP421 on Arduino YUN

Post by teshanab » Wed Feb 03, 2016 4:34 pm

Hi Paul or whomever can help :)

I am doing a project for my manager where I need to ger the Internal and External temp of the TMP421. I have it connexted to an Arduino Pro. Whenever I try to run the code below, it throws an error. I believe i have an issue uploading the TMP421 Library to the Arduino any help would be appreciated.!

Code:

#include <Wire.h>
#include <TMP421.h>
TMP421 temp = TMP421(0x4C);

void setup()
{
Serial.begin(9600);
}

void loop()
{
float intTemp = temp.getIntTemp(); // Get local temperature in Celcius degree
float extTemp = temp.getExtTemp(); // Get remote temperature in Celcius degree
Serial.print("Local Temp = ");
Serial.print(intTemp,DEC);
Serial.print(" C ");
Serial.print("Remote Temp = ");
Serial.print(extTemp,DEC);
Serial.println(" C");

float intTempF = temp.getIntTempF();// Get local temperature in Fahrenheit degree
float extTempF = temp.getExtTempF();// Get remote temperature in Fahrenheit degree
Serial.print("Local Temp = ");
Serial.print(intTempF,DEC);
Serial.print(" F ");
Serial.print("Remote Temp = ");
Serial.print(extTempF,DEC);
Serial.println(" F");

delay(1000);
}

Error:
Arduino: 1.6.7 (Windows 8.1), Board: "Arduino Pro or Pro Mini, ATmega328 (3.3V, 8 MHz)"

C:\Users\TESHANAX\Documents\Arduino\Getlocal_remote_temp\Getlocal_remote_temp.ino:4:21: fatal error: TMP421.h: No such file or directory

#include <TMP421.h>

^

compilation terminated.

exit status 1
Error compiling.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
PLease and thank you

Michaelkfyif
Posts: 9
Joined: Tue Sep 19, 2017 5:02 pm

TMP421 on Arduino YUN

Post by Michaelkfyif » Sun Sep 24, 2017 2:53 am

I've tried to reset the makey makey, but it keeps showing up as an arduino yun.
It still works though, the keys and the mouse work, and the board shows all the leds
Any ideia on how to fix this?

Fredaueuv
Posts: 5
Joined: Tue Sep 19, 2017 8:43 pm

TMP421 on Arduino YUN

Post by Fredaueuv » Mon Oct 02, 2017 4:48 pm

I've tried to reset the makey makey, but it keeps showing up as an arduino yun.
It still works though, the keys and the mouse work, and the board shows all the leds
Any ideia on how to fix this?

Post Reply