Jump to content

Search the Community

Showing results for tags 'float'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Calendars

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests


Sparkfun


Github

Found 5 results

  1. This snippet does not give the expected results (and I know I should be checking the return code of sscanf()...), the string contains text like "60.0" when asked for a frequency. float request = 50.0f; sscanf(string, "%f", &request); // having trouble since energia version 1.6.10E18 with floats... Under version energia_0101E0015, request becomes whatever float value is in the string (say 60.0), but under energia_1.6.10E18 request remains at the initialized value. Same with this snippet: sprintf(timecodeBuffer, "f# %04d ft %.03f %02d:%02d:%02d.%02d.%03d Squid_%c_[%02d:%02d:%02d.%02d] delta:%.03f \n", frameNumber, frameTime, computeHours, computeMinutes, computeSeconds, computeFrames, computeMilliSecs & 0x0000ffff, live, timecodeHours, timecodeMinutes, timecodeSeconds, timecodeFrames, timeDiff); Under version energia_0101E0015 it prints everything fine, but under energia_1.6.10E18 the floats are printed as a blank space. Computing with float values is not a problem. My include section looks like this: #include <Ethernet.h> #include <EthernetUdp.h> #include "inc/hw_ints.h" // our TM4C1294NCPDT is in the SnowFlake interrupt class #include "inc/hw_memmap.h" #include "driverlib/pin_map.h" #include "driverlib/sysctl.h" #include "driverlib/pwm.h" #include <string.h> #include <stdio.h> #include "Wire.h" // using the I2C bus for display My setup: Tiva-C connected EK-TM4C1294XL, 120 MHz tmc129 I tried upgrading to version 1.6.10E18. I really like the new board chooser and it downloaded the appropriate drivers and build tool chain. I think however the problem originated with the different tool chain. My OS is Kubuntu 18.04 LTS (with 32 bit libraries licb6:i386 for the lm4f tool chain to work under 64-bit ubuntu)
  2. Greenworld

    Compute float number in msp430g2

    Hi everyone, I use the following function to compute the angle from accelerometer: float a =atan2f(-0.143798828, -0.680053711); But it can not return a proper result (a huge number ~10^22). How I can compute the angle directly on the chip. (I used CCS IDE). Thanks!
  3. hi, I am using a MSP430FR4133 launchpad, i am trying to get a float value and send it via sim800. for that i hve to convert the float value to char* or char array. I have tried many conversions but i am not able to get the conversion properly. Even if i get it properly while printing it on the serial. The data is not transmitted in the right format through sim800. for example if i use dtostrf( buff , "%f" , flaotVal); function in serial monitor only "%f" is getting printed. and if i try other type of convertions , while transmitting through sim800 the right side part of the float value gets added to the decimal values . have tried ( itoa(), sprintf(), etc..) for example .. float value = 1.25. and if i tried converting and printing it on serial monitor i am getting it corrrectly as "1.25" . But when i am trying to transmit through sim800 the converted float value is sent as "0.125" instead 1.25 . Can anyone help me with this?.
  4. xyiii

    Converting Float to String

    char final[6]; sprintf(final, "%.3f",current); Serial.println(final); When I put this code to calculate it prints only the "%.3f" I know floating point is not good to use for MSP430, but I do need the decimal places for my calculated results and need to convert to string pass on java socket. Or Can someone introduce me the fixed point calculation? many thanks!
  5. Hi Everyone, I have been looking for about an hour online and haven't been able to find the answers to these questions. - Can I use floating point with the msp4302553 ? the watch expression on CCS don't seems to like floating point for sure. - Can I use math.h to do trigonometry calculus on the msp430g2553 ? Let me tell you guys what I am trying to do so that it is more clear: I am scanning a signal with an ADC. I would like to do an atan() on the signal and output the signal with an DAC. Right now I can scan the signal and send it to the DAC. This works well. But I can't get the trigonometric conversion to work. Is it possible to do it? And if yes could I get a little help from you guys ? Thanks in advance for your help. Thomas PS: I saw about these Qmath functions that came out recently but couldn't get it to work either http://www.ti.com/tool/MSP430-iqmathLIB?DCMP=ep-mcu-msp-iqmath-en&HQS=ep-mcu-msp-iqmath-pr-sw2-en
×