Hello Folks,
i stuck in display the ° Sign in Micropython on an ESP8266. Python 3.5 converted by typing "print(chr(176))" the degree sign well. But with micropython 1.9.4 and the fork from loboris for the ESP32 i got the message: "recv unexpected word."
Any solutions?
Kind regards,
Holger
How to get the Degree Sign (chr176) in Micropython?
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: How to get the Degree Sign (chr176) in Micropython?
This works on standard MicroPython (tested on Unix build and on Pyboard). So it looks like an issue specific to the Loboris port. I suggest you raise it either on GitHub or on the Loboris forum.
Code: Select all
MicroPython v1.9.4-131-gb789c64 on 2018-06-07; linux version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> print(chr(176))
°
>>>
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: How to get the Degree Sign (chr176) in Micropython?
It works without issues:
Code: Select all
MicroPython ESP32_LoBo_v3.2.18 - 2018-06-04 on ESP32 board with ESP32
Type "help()" for more information.
>>> print(chr(176))
°
>>>
How are you connected to the board?
Re: How to get the Degree Sign (chr176) in Micropython?
You are right. Its a Problem with my terminal. I use uPycraft and on print(chr(176)) i got the reply "recv unexpected word." With putty "print(chr(176)) works well.