Search the Community

Showing results for tags 'temperature'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks


  • Community Calendar

Found 9 results

  1. Hello, I am hoping to convert Example 09 of the Energia examples (thermistor temperature with the MSP430F5529) to entirely C language to use in Code Composer Studio - I've already used the import function to use this example in CCS and it works fine with the code given, but I'd like to re-work the example to only use C functions like main().c. Is there a simple way to do this? I'm still learning C and need the experience! Example 09 is attached for reference.EXAMPLE09_Temperature.ino
  2. Hi all i'm programming by MSP430fr5739 a temperature and humidity reading by the DHT11 sensor. ?The wire are correct, and so the problem is'nt in the link, it is in the code. This is my code, usind the dht11 library, find on internet. ?The main problem is that i don't know how to read the value of T and H, and maybe there is some problems in the reading (probably in the interrupt) ?Thanks for the advice. ?MAIN CODE: #include <msp430.h> #include <DHT11_LIB.h> unsigned char RH_byte1; unsigned char RH_byte2; unsigned char T_byte1; unsigned char T_byte2; unsigned char checksum; unsigned char Packet[5]; unsigned char volatile TOUT; unsigned char volatile SECOND_TIMER=0; void init(void); #pragma vector = TIMER0_A0_VECTOR __interrupt void CCR0_ISR(void){ SECOND_TIMER++; TOUT=1; //TOG (P1OUT,0x01); per il led CLR (TA0CCTL0, CCIFG); } void init(){ WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer PJDIR = BIT1+BIT2+BIT3; // Set LED to output direction PJOUT = BIT1; //high the LED PJOUT = BIT2; //Set clock and timer CSCTL1 = BIT1+BIT2 ; // DCO a 8MHz CSCTL2= SELS_3; // SMCLK take DCOCLK TA0CCR0 = 50000; // Initialize the timer to count at 20Hz TA0CTL = TAIE_1; // Enable interrupt TA0CTL = TASSEL_2 + ID_3 + MC_1+ TACLR ; // SMCLK, div 8, up mode, e fa il clear _enable_interrupt(); //Enable global interrupt } void main(void) { init(); while(1){ //Must wait 1 second initially and between all reads if(SECOND_TIMER >= 5){ TOG (PJOUT,BIT1); // Simple way to gather all data with one instruction read_Packet(Packet); RH_byte1 = Packet[0]; RH_byte2 = Packet[1]; T_byte1 = Packet[2]; T_byte2 = Packet[3]; checksum = Packet[4]; if (check_Checksum(Packet)) SET (PJOUT, BIT1); //Se il checksum giusto si riaccende SET (TA0CTL, TACLR); SET (TA0CTL, 0x10); //Up mode TA0CCR0 = 50000; //Initialize the timer to count at 5Hz SECOND_TIMER = 0; //Clear counter } } } DHT11 LIBRARY: #ifndef DHT11_LIB_H_ #define DHT11_LIB_H_ #define TST(x,y) (x & (y)) #define SET(x,y) (x|= (y)) #define CLR(x,y) (x &= ~(y)) #define TOG(x,y) (x ^= (y)) #define DPIN BIT0 extern unsigned char volatile TOUT; void start_Signal(void); void start_Signal(){ SET(P2DIR, DPIN); // Set Data pin to output direction CLR(P2OUT,DPIN); // Set output to low __delay_cycles(25000); // Low for at least 18ms SET(P2OUT,DPIN); //HIGH __delay_cycles(30); // High for at 20us-40us CLR(P2DIR,DPIN); // Mette il pin in ricezione (Input) } unsigned char check_Response(void); unsigned char check_Response(){ TOUT=0; SET(TA0CTL,TACLR); //Reset timer to 0; TA0CCR0 = 100; //Set timer to overflow in 100uS. SET(TA0CTL,CCIE); //And enable timer interrupt while(!(TST(P2IN,DPIN)) && !TOUT); //while if IN=0 if (TOUT) return 0; else { SET(TA0CTL,TACLR); SET(TA0CTL,CCIE); while((TST(P2IN,DPIN)) && !TOUT); if(TOUT) return 0; else{ CLR(TA0CTL,CCIE); // Disable timer interrupt return 1; } } } unsigned char read_Byte(void); unsigned char read_Byte(){ TOUT = 0; unsigned char num = 0; unsigned char i; CLR(TA0CTL,CCIE); for (i=8; i>0; i--){ while(!(TST(P2IN,DPIN))); //wait the hing signal SET(TA0CTL,TACLR); // clear SET(TA0CTL,0x10); //Up mode (Mode control 01b) SET(TA0CTL,CCIE); //enable interrupt while(TST(P2IN,DPIN)); //wait the low signal CLR(TA0CTL,0x30); //held counter if (TA0R > 0x28) //TA0R
  3. Hello everyone, I just started programming in C ++ to solve a small university project. I am a newbie in programming that's why I ask you a hand in writing the code. I'm working with Msp430fr5739 and the temperature and humidity sensor is the DHT11. The connections have already been made and we have to write the code. I already have the library DHT11 and I'm working in CCS. Can someone share a code that works and allows me to read the values of temperature and humidity? Thank you (and sorry for my english)
  4. I finished up my first Energia project, a template library for the Bosch BMP085 temperature and pressure sensor. It uses I2C and supports temperature in Celsius and pressure in Pascal. I connected the GY-80 breakout commonly found on eBay, but it should also work with most other BMP085 breakouts, like the ones from Adafruit or Sparkfun. Note that I had to patch Energia to make 1-byte read work on MSP430G2553 with Rev1.5 LaunchPad. I also had to remove the LED2 jumper, probably due to too weak I2C pull-up. Update: Tested on LaunchPad 1.5 with MSP430G2553, StellarPad Rev A and Arduino R3. Energia requires patches 226 and 235 in twi.c for I2C to work properly on MSP430G2553 Updates: - Tested with Energia 0101E0010 with MSP430G2553 and F5529, no more I2C patches needed. - Tested with BMP180 and Software I2C - Fixed I2C for Energia 0101E0016 by removing ugly hacks from the past from the library code. Tested only with MSP430G2553
  5. Hello, fellow launchpad enthusiasts! I am having problems reading temperature sensor values on my stellaris launchpad (LM4F120H5QR). The values returned by analogRead(TEMPSENSOR) are erratic and do not correlate with actual temperature. I use ubuntu 14.04 and energia 0101E0014. I tried following code: uint32_t TempRead = 0; float TempC = 0; void setup() { Serial.begin(9600); analogRead(TEMPSENSOR); } void loop() { TempRead = analogRead(TEMPSENSOR); TempC = (float)(1475 - ((2475*TempRead)/4096))/10; Serial.print("ADC value: "); Serial.println(TempRead); Serial.print("Temperature in C: "); Serial.println(TempC); Serial.println("------------------------"); delay(1000); } While runnning this code and putting my finger on MCU this code gives: ADC value: 1939 Temperature in C: 32.40 ------------------------ ADC value: 1871 Temperature in C: 34.50 ------------------------ ADC value: 1899 Temperature in C: 32.80 ------------------------ ADC value: 1895 Temperature in C: 33.00 ------------------------ ADC value: 1895 Temperature in C: 33.00 ------------------------ ADC value: 1899 Temperature in C: 32.80 ------------------------ ADC value: 1899 Temperature in C: 32.80 ------------------------ ADC value: 1895 Temperature in C: 33.00 ------------------------ ADC value: 1899 Temperature in C: 32.80 ------------------------ ADC value: 1899 Temperature in C: 32.80 ------------------------ ADC value: 1895 Temperature in C: 33.00 ------------------------ ADC value: 1899 Temperature in C: 32.80 Basicaly no changes in reading, apart from random-like stuttering. Anyone have an idea what could be the problem here?
  6. Here is the zip that bluehash requested that I post. Tested with DHT11, output to an LCD. Here is the original post:
  7. I am writing a program that is supposed to read the temperature from the MSP430's internal sensor, then display it through the LED's by making the red one blink the 10's digit and the green one blink the 1's digit. Pushing the button should toggle between Farenheit and Celcius, default Fahrenheit. My question is about the output of the analogRead(TEMPSENSOR) function. I know that the output of the function is an int between 0 and 1023 that maps to a range of 0 to 3 volts. What I don't understand is how that output translates to a temperature. I tested the function by just printing the output of analogRead(TEMPSENSOR) to see what reading it put out, and it fluctuated between 511 and 512 (translating to 1.4819 to 1.4848 volts). Any help or insight would be much appreciated. Code I have written so far: void setup() { Serial.begin(9600); pinMode(GREEN_LED, OUTPUT); pinMode(RED_LED, OUTPUT); pinMode(TEMPSENSOR, INPUT); pinMode(PUSH2, INPUT_PULLUP); } void loop() { int Temperature, Units, Tens, t int Reading = analogRead(TEMPSENSOR); digitalWrite(GREEN_LED, LOW); digitalWrite(RED_LED, LOW); Serial.println(Reading); delay(500); Temperature = Reading //Convert the tempsensor reading to a temperature in Fahrenheit if (buttonState == LOW) { Temperature = (5/9)(Temperature-32); } Units = Temperature%10 Tens = (Temperature-Units)/10 for(t=0, t<Tens, t++) { digitalWrite(RED_LED, HIGH); delay (250); digitalWrite(RED_LED, LOW); delay(250); } delay(5000); for(t=0, t<Units, t++) { digitalWrite(GREEN_LED, HIGH); delay (250); digitalWrite(GREEN_LED, LOW); delay(250); } delay(5000); } Obviously it won't work right now as "Reading" hasn't been converted to "Temperature" yet. Thanks again for any help!
  8. I've built a wireless temperature monitor with the following features: Very low-power (7uA) sleep mode Dual 1-wire dallas temperature sensor inputs, to measure two temperature sensors at the same time. A 2-line LCD display that displays the current measurement for 15 seconds when a button is pushed. 2xAA battery supply, with charge pump to power the LCD, temperature sensors and 433Mhz wireless module. Uses VirtualWire to transmit the data to an MSP430-powered receiver module. This is all currently sitting outside, and the indoor rx unit is uploading the measured temperatures as well as the battery voltage to Cosm. I've attached to this post the eagle files for the outdoor unit, and the veroboard layout for the same. I'll upload some photos also, and details of the indoor unit and the python script that uploads the data to cosm. The indoor unit is currently sitting on a breadboard, not in a nice project box, but its time will come I've hacked the VirtualWire library to bits, leaving only the transmitting portion of the code. This was so that I could understand it, and so that I could have it running at a lower timer speed for (very slightly) lower power. There's a few things in the schematic that might not really be necessary. I've used two fets to switch off the radio and the lcd/sensor separately, because I was under the impression that the radio transmitted the whole time while powered on. I now realise that it only transmits when the data pin is high, so I could have saved myself a component there. Also I'm using a whole hex level shifter IC just for the one input into the radio, because the other shifter's lines are all used up by the LCD. This also isn't necessary, since a singe fet would have done the job if I'd inverted the output of VirtualWire in software. But in any case, it all works, and seems (so far) fairly reliable. There are some spurious readings that I accidentally uploaded to cosm while working on the receiver end, but other than that I'm pretty happy. What I'm really quite interested in is how the battery voltage is going to change over the coming few years. Please feel free to use any of the code that I've uploaded, but be aware that in the words of some other forum poster somewhere, it's not supposed to be pretty - it's just supposed to work! -dave
  9. Hi everyone, I have a project that contains nokia 5110 lcd, msp430( it has g2553) and 8 connection cables between with lcd and msp430(There is no resistance or another thing). I should scale temperature and print on the 5110 lcd. I have 2 compiler programs which are Iar and energia. Additionally, I tried to set CCS but I couldn't set up, there was a mistake.Also, In IAR program any mistake occurs, I don't remember what is this problem. Thus, Energia compiler fully works but I couldn't find code. I want to code that used in energia compiler. Can anyone help me, please?