Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by yellamo

  1. Hi @@roadrunner84, Sorry for the delay getting back! Thanks for the pointers about the float. I've tried the code, had to change the ints to double as there was an error, and getting the following output - I've got a digital themomethere here and it is showing 21c. double deg, deg100; char diet[8]; deg100 = modf(tmp006.readDieTempC(), °) * 100; sprintf(diet, "%u.%02u", deg, deg100); Serial.print("\r\n\DIET ");Serial.print(diet); The error with the int was as follows: error: cannot convert 'int*' to 'double*' for argument '2' to 'double modf(double, double*)' Thanks
  2. Thanks @@roadrunner84, The issue is with the float. I can construct the JSON fine in string, but everything after the decimal point in the float is trimmed. static float diet = tmp006.readDieTempC(); //This Displays fine - from standard TMP006 Example Serial.print("Die Temperature: "); Serial.print(diet); Serial.println("*C"); //This example with "long" will only give a value before decimal, as exptected, but I need the exact value eg. 20.12. String pubString = "{\r\n\"abc\":" + String1 + ",\r\n\"temp\":" + long(diet) + ",\r\n\"def\":" + String2 + "\r\n}"; //What I get {"abc":"1234
  3. Hi RoadRunner, Thanks for the helpful reply. Ultimately I want to construct a string of multiple values which can be posted as a JSON value. I have tried both the examples and the second one is very good, but I am having the same issue with this bit of code - it works fine in a new sketch, but once I add this into my sketch with all the code in, it returns zeros! The same goes for another piece of code suggested there too: String pubString7; char buffer1[8]; float diet1 = 40.05; sprintf(buffer1, "%.2f", diet1); pubString7 = "\r\n\Temperature Test : "; pubString7 += buffer1; Seri
  4. Hi Guys, I've posted an issue over on the Ti website but they have suggested posting in an Energia forum too. The issue I am seeing is when concatenating a string and a long number. It either goes one of two ways - the value is zeros, or the numbers following the decimal point are missing. https://e2e.ti.com/support/wireless_connectivity/f/968/t/414222 //This works fine static float diet = tmp006.readDieTempC(); Serial.print("Die Temperature: "); Serial.print(diet); Serial.println("*C"); //This doesnt String pubString = "Temperature " + long(diet); Serial.print(pubString); The
  5. Yep, made sure they matched what was on the video - Its at 8.00min
  6. Hi Guys, Having a nightmare getting CCS setup even following the SimpleLink Wi-Fi CC3200 Project 0: Code Composer Studio IDE I keep getting the following errors: Cortex_M4_0: GEL Output: Memory Map Initialization Complete Cortex_M4_0: Failed CPU Reset: This operation is not supported by this driver Cortex_M4_0: GEL Output: Target Reset Cortex_M4_0: Trouble Writing Memory Block at 0x20004000 on Page 0 of Length 0x7ff0: This operation is not supported by this driver Cortex_M4_0: File Loader: Verification failed: Target failed to write 0x20004000 Cortex_M4_0: GEL: File: C:\Users\La
  • Create New...