TMP421 on Arduino YUN
-
- Posts: 2
- Joined: Thu Jan 02, 2014 2:59 pm
TMP421 on Arduino YUN
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.
Re: TMP421 on Arduino YUN
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
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
-
- Posts: 2
- Joined: Thu Jan 02, 2014 2:59 pm
Re: TMP421 on Arduino YUN
Yes, it works fine by altering the code to accommodate the YUN signal relocation
Re: TMP421 on Arduino YUN
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
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
-
- Posts: 9
- Joined: Tue Sep 19, 2017 5:02 pm
TMP421 on Arduino YUN
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?
It still works though, the keys and the mouse work, and the board shows all the leds
Any ideia on how to fix this?
TMP421 on Arduino YUN
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?
It still works though, the keys and the mouse work, and the board shows all the leds
Any ideia on how to fix this?