Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Geschrieben

Hi,

 

the Brick MQTT Proxy is a great extension - simplified a lot.

 

Question: How to display special chars on the LCD20x4?

Looking at the example below, how to display f.e. the special char ° which is HHHHHHHL according the special char table.

 

Example Publish Command:

mosquitto_pub -t tinkerforge/bricklet/lcd_20x4/rTS/write_line/set -m '{"line":0, "position":5, "text":"25 °C"}'

 

 

Geschrieben

Actually the degree sign in 0b11011111 == 0xDF.

 

So you need to pass 0xDF for the degree sign. You can do this with a Unicode escape sequence: \u00DF

 

mosquitto_pub -t tinkerforge/bricklet/lcd_20x4/rTS/write_line/set -m '{"line":0, "position":5, "text":"25 \u00DFC"}'

Geschrieben
  • Autor

Thanks a lot - works fine.

 

Further Question: Where to find the list of special chars and unicode to use (like the example you gave)?

Looking for Arror Up and Arrow Down to show trend on the LCD20x4 Bricklet display.

 

Again: The MQTT Proxy is fantastic.

Geschrieben

You already looked in the right place:

 

https://github.com/Tinkerforge/lcd-20x4-bricklet/raw/master/datasheets/standard_charset.pdf

 

You need to take the 4 bit column and row number (H = 1, L = 0) of the character you want and interpret it as binary like this:

 

0b<column><row>

 

Convert that to hex and prepend "\u00".

 

You said "°" would be "HHHHHHHL". You where off by one column and had column and row mixed up.

 

Actually "°" is in column HHLH and row HHHH. This translates to 0b11011111, that is 0xDF in hex. Prepended with \u00 you get \u00DF.

Geschrieben
  • Autor

Thanks a lot for this very good explaination.

You might consider to include this in your documentation of the LCD displays.

 

Geschrieben
  • Autor

One more related question is how to write a custom char. The standard table does not contain arrow up. Question is how to translate the custom arrow up from bytes to the hex value to be displayed as asked previous.

* ``character[0] = 0b00000000`` (decimal value 0)

* ``character[1] = 0b00000100`` (decimal value 4)

* ``character[2] = 0b00001010`` (decimal value 10)

* ``character[3] = 0b00011011`` (decimal value 27)

* ``character[4] = 0b00000100`` (decimal value 4)

* ``character[5] = 0b00000100`` (decimal value 4)

* ``character[6] = 0b00001110`` (decimal value 14)

* ``character[7] = 0b00000000`` (decimal value 0)

       

Appreciate your help

Geschrieben

Set custom character 0:

 

mosquitto_pub -t tinkerforge/bricklet/lcd_20x4/SCD32/custom_character/set -m '{"index":0, "character":[0,4,10,27,4,4,14,0]}'

 

Write it:

 

mosquitto_pub -t tinkerforge/bricklet/lcd_20x4/SCD32/write_line/set -m '{"line":0, "position":0, "text":"Up: \u0008"}'

 

Custom character 0-7 map to \u0008-\u00015 \u0008-\u000F. (Edit: \u takes hex numbers)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.