Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:08 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Degree symbol

Author Message
busa
Regular Member

Joined: 12/02/2015
Location: Australia
Posts: 81
Posted: 12:24am 25 Feb 2015
Copy link to clipboard 
Print this post

I have a program running on the Micromite V4.6b that measures temperature and humidity in a particular room. I can poll the Micromite via a GSM module and it will SMS the current temperature and humidity back to me to take further action if necessary. My small niggle is that when it sends the SMS my phone does not include the degree symbol. The line of code that sends the SMS is
Sub Update
TEXT(phoneNumber$, "The temperature is currently " + str$(temp) + "ºC and the humidity is " + str$(humid) + "% at " + time$ + " on " + date$)
pause 5000
end sub

I input the degree symbol using ALT + 248 on my keyboard but the phone(Android)just ignores it. Any ideas what I might be doing wrong?
By the way, a huge thank you to Geoff here for his unbelievable work that has been done firstly on the Maximites and now the Micromite. It has certainly rekindled my interest in programming again especially with all the cheap modules and sensors that abound these days. My first computer was an Amstrad CPC 464 but the cost of interfacing to many sensors was out of my league. So take a bow Geoff and thanks.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 02:39am 25 Feb 2015
Copy link to clipboard 
Print this post

It's a non-standard character, not present in many character sets.

How it's to be input - if it does exist - will depend on the device / OS / direction you're facing.

Can you really not manage without it?

One way forward is to find what your destination needs (if it does have it) and then send that using CHR$()

JohnEdited by JohnS 2015-02-26
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3292
Posted: 02:47am 25 Feb 2015
Copy link to clipboard 
Print this post

Thanks for the appreciation. I actually get the most reward when I see projects such as yours - I do a bit of work to create a tool and then enthusiasts such as yourself leverage it to make great projects.

But, sorry, I don't know how to make a degree symbol. Perhaps someone else has the answer.

Geoff
Geoff Graham - http://geoffg.net
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2442
Posted: 04:29am 25 Feb 2015
Copy link to clipboard 
Print this post

try chr$(167) instead. it may work (or it may not)

cheers,
rob :-)
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2944
Posted: 07:07am 25 Feb 2015
Copy link to clipboard 
Print this post

If Rob's Chr$(167) doesn't work then why not use a single quote! I know it's not perfect but it is better than just C or F by itself.

WWEdited by WhiteWizzard 2015-02-26
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 12:22pm 25 Feb 2015
Copy link to clipboard 
Print this post

I did a quick Google and it seem to be a common problem.

  Quote  A completely useless factoid I just discovered.

I used the Windows character map to copy and paste a degree symbol (°) into my PC SMS application and sent it to my mobile phone. What arrived at my phone was the letters “Ao”.

So for those of you wondering, you can’t send a degree symbol via SMS.

Next time I will have say 2 deg not 2°

And another thing. The HTML entity for a degree sign is °


You could try experimenting with the HTML code.

An other option is unicode but I would stay away from that.

Jim

VK7JH
MMedit
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 12:55pm 25 Feb 2015
Copy link to clipboard 
Print this post

  WhiteWizzard said   If Rob's Chr$(167) doesn't work then why not use a single quote! I know it's not perfect but it is better than just C or F by itself.

WW


For what it's worth, this is exactly how I did it on one of my projects.

System Temperature: 37'C

Sure, it is not the exact symbol, but I don't think there would be many who would not be able to work out what it means. (famous last words! )
Smoke makes things work. When the smoke gets out, it stops!
 
busa
Regular Member

Joined: 12/02/2015
Location: Australia
Posts: 81
Posted: 03:29pm 25 Feb 2015
Copy link to clipboard 
Print this post

Thanks everyone for the answers. The single quote seems the best way to go.
 
ajkw
Senior Member

Joined: 29/06/2011
Location: Australia
Posts: 290
Posted: 09:21pm 25 Feb 2015
Copy link to clipboard 
Print this post

Whilst this doesn't suit the OP's application and he already seems to have found a way I just thought however I would add this as a way for a degree symbol on a LCD character display.

Cheers.



 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 02:48am 05 Mar 2015
Copy link to clipboard 
Print this post

I think a lot of people have had this problem. Pity we can't go back to before 1963 when the first ASCII standard was published - then we could swap one of those old redundant control characters for a degree character.

For what it's worth I use the lower case alphabetic 'o'. It's on the line rather than above, but it doesn't look too bad: 19.5oC rather than the quote: 19.5'C

Greg
 
twofingers

Guru

Joined: 02/06/2014
Location: Germany
Posts: 1593
Posted: 05:12am 05 Mar 2015
Copy link to clipboard 
Print this post




causality ≠ correlation ≠ coincidence
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025