Jump to content
lalo630

RF Wireless LCD Temp Monitor Using TM4C123 & MSP432

Recommended Posts

Hello,

 

I want to make a wireless thermometer using two microcontrollers.

 

How do I write the code in Energia to transmit and receive a variable using a 433 Mhz RF module? 

 

 

Transmitter Setup:

I have a TM4C123G connected to a RF transmitter using TX(3) pin 34 on the MCU.

The TM4C123G is also connected to a LM34DZ Temp sensor.

 

 

 I need help to modify this working code to send the temperature variable using tx(3) pin 34

/*TM4C123G*/

//initializes/defines the output pin of the LM34 temperature sensor
int outputpin= A11; // (pin # 2), use A11 analog input
 
//---------------------------------------------------------------------
 
//this sets the ground pin to LOW and the input voltage pin to high
void setup()
{
Serial.begin(9600);  
Serial3.begin(9600);
//----------------------------------------------------------------------
}
void loop()  {
int rawvoltage= analogRead(outputpin);
float millivolts= (rawvoltage/4095.0) * 3300;
float fahrenheit= millivolts/10;
 
Serial3.write(fahrenheit); //transmits temperature to receiver
Serial.println(fahrenheit);//displays temperatur on Serial monitor
delay(200); 
}

Receiver Setup:

 

I also have a MSP432 connected to a RF receiver using rx pin 3 on the MCU.

The MSP432 is connected to a 16x2 LCD.

 

 

 I need help to modify this working code to receive the temperature variable using rx pin 3 and display to the lcd.

/*Receiver MSP432*/
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
#define rfReceivePin 3 //RF Receiver pin = pin 3
unsigned int data = 0; // variable used to store received data

byte address = 0x3F; // LCD I2C address
int columns = 16; // number of columns on LCD
int rows = 2; // number of rows on LCD
LiquidCrystal_I2C lcd(address, columns, rows);

//-----------------------------------------------------------------
void setup()
{
lcd.init(); // initialize the lcd 
lcd.backlight();

}
//-----------------------------------------------------------------
void loop()
{ 
lcd.clear();
lcd.setCursor(0,0);
data=analogRead(rfReceivePin); //listen for data on pin 3
lcd.print("Temperature");

lcd.setCursor(0,1);
lcd.print(data);
delay(500); 
}

Share this post


Link to post
Share on other sites

How do I write the code to transmit and receive the temperature using a rf module?

 

I want to transmit the temperature wireless from the tm4c123g to the msp432. 

 

Working:

 

  • The TM4C123G can display the temperature correctly on the Energia serial monitor. 
  • The MSP432 is connected to an LCD and that is also working.
  • The TM4C123G has the rf transmitter connected to tx(3) pin 34
  • The MSP432 has the rf receiver connected to rx pin 3

 

Problem:

 

  • I do not know how to program the RF module to work.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×